aws / aws-msk-iam-auth

Enables developers to use AWS Identity and Access Management (IAM) to connect to their Amazon Managed Streaming for Apache Kafka (Amazon MSK) clusters.
Apache License 2.0
145 stars 67 forks source link

Is python library available for IAM authentication for MSK? #65

Closed ams45 closed 2 years ago

ams45 commented 2 years ago

Is python library available for IAM authentication for MSK?

I wanted to try to write kafka producer using python with IAM role authentication. Does anyone know if any API/sdk is available in python?

OneCricketeer commented 2 years ago

Related #10

grsubramanian commented 2 years ago

Closing as duplicate of #10 .

van4oza commented 1 year ago

kafka-python + SASL auth MSK worker for me

producer = KafkaProducer(
    bootstrap_servers=SASL_SERVERS,
    value_serializer=lambda v: json.dumps(v).encode('utf-8'),
    api_version=(2,8,1),
    security_protocol='SASL_SSL',
    sasl_mechanism='SCRAM-SHA-512',
    sasl_plain_username=os.getenv('KAFKA_USER'),
    sasl_plain_password=os.getenv('KAFKA_PASS'),
    retries=1
)
aidan-melen commented 1 year ago

kafka-python + SASL auth MSK worker for me

producer = KafkaProducer(
    bootstrap_servers=SASL_SERVERS,
    value_serializer=lambda v: json.dumps(v).encode('utf-8'),
    api_version=(2,8,1),
    security_protocol='SASL_SSL',
    sasl_mechanism='SCRAM-SHA-512',
    sasl_plain_username=os.getenv('KAFKA_USER'),
    sasl_plain_password=os.getenv('KAFKA_PASS'),
    retries=1
)

I think the OP is more interested in SASL/IAM support