Amazon MSK Connect - IAM role

0

Hi, I need to setup a msk connect service on top of my msk service. The purpose is to connect the msk service to my document db service .Eventually,there will be 2 connectors : source & sink. I understand that I need to create a role and assign permissions . However,I cant figure what should be the permissions which I need to assign to the role and I cant find a working example. Please advise Rudi

2 Answers
0

When you create a connector with MSK Connect, you are required to specify an AWS Identity and Access Management (IAM) role to use with it. The service execution role must have the following in the trust relationship policy:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Principal": {
        "Service": "kafkaconnect.amazonaws.com"
      },
      "Action": "sts:AssumeRole",
      "Condition": {
        "StringEquals": {
          "aws:SourceAccount": "Account-ID"
        },
        "ArnLike": {
          "aws:SourceArn": "MSK-Connector-ARN"
        }
      }
    }   
  ]
}

If the Amazon MSK cluster that you want to use with your connector is a cluster that uses IAM authentication, then you must add the additional permission's policy to the connector's service execution role. Kindly refer to this AWS documentation for the details in regard to permissions policy requirement.

Also, MSK Connect uses the service-linked role named AWSServiceRoleForKafkaConnect, which Allows Amazon MSK Connect to access Amazon resources on your behalf. MSK Connect defines the permissions of its service-linked roles, and unless defined otherwise, only MSK Connect can assume its roles. Kindly refer to this AWS document in regard to details of "Service linked role" used by MSK connect.

profile pictureAWS
SUPPORT ENGINEER
Varun
answered 2 years ago
0

You say

"MSK-Connector-ARN"

I don't know what you mean. Can you give an example of what it looks like and where it comes from?

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions