cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Connecting AWS MSK from Databricks

DB_Five
New Contributor II

Hello ,

I am new to AWS and MSK. I have created MSK on VPC with public subnet and I am trying to connect it from Databricks  on AWS. I see that both MSK and VPC are in two different VPC.  

Do we need to create VPC peering to establish the connection between the two. I have not seen any documentation or any thread mentioning this setup. 

Can someone help me with this.

 

Regards,

Harsha

3 REPLIES 3

BigRoux
Databricks Employee
Databricks Employee

Greetings DB_Five, To connect an Amazon Managed Streaming for Apache Kafka (MSK) cluster from a Databricks workspace on AWS when both are in different Virtual Private Clouds (VPCs), you will need to establish a network connection between the two VPCs.

Several options are available:

1. VPC Peering

2. AWS PrivateLink

3. AWS Transit Gateway

 

Hope this helps.  Louis.

DB_Five
New Contributor II

 

Hello,

Thanks for your quick update. 

I will continue with the setup. I also have one more question. 

It is mentioned in the set up that, we have to have the bellow in the Kafka client properties.

In addition, if you choose to configure your connection using an IAM role, you must modify the value provided to kafka.sasl.jaas.config to include the role ARN, as in the following example: shadedmskiam.software.amazon.msk.auth.iam.IAMLoginModule required awsRoleArn="arn:aws:iam::123456789012:role/msk_client_role"


Do we have to createa new IAM role with permissions to access Kafka or we can use the IAM role associated with the workspace creation.


Regards,
Harsha

BigRoux
Databricks Employee
Databricks Employee

When configuring your connection to Amazon Managed Streaming for Apache Kafka (MSK) using an IAM role, you have the option to use either a new IAM role specifically created for this purpose or the IAM role associated with your Databricks workspace. 

Hope this helps. Louis

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group