Closed ams45 closed 2 years ago
Related #10
Closing as duplicate of #10 .
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
)
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
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?