Deploy MSK Cluster and AWS SAM project with AWS Lambda to demonstrate SASL authentication
Amazon MSK → AWS Lambda
Create an AWS Lambda function that uses an Amazon MSK Topic as an event source.
This pattern provides two resources -
- An Amazon CloudFormation template to deploy a serverless or provisioned MSK cluster and Cloud9 instance in the same VPC to interact with the MSK cluster
- An AWS SAM project with a Lambda Function to demonstrate SASL authentication.
To test this pattern, first deploy the CloudFormation stack using the template file MSKSampleStack.yml under msk-cfn-sasl-lambda/create-cluster-cfn. You will need to chose if you'd like to provision serverless or provisioned cluster. For both options, all available authentication mechanisms are enabled - TLS, SASL/SCRAM, and IAM for provisioned cluster, and IAM for serverless. Follow msk-cfn-sasl-lambda/create-cluster-cfn/README.md for detailed instructions
Next step is to deploy the Lambda Function. Follow steps under msk-cfn-sasl-lambda/README.md to deploy and test the Lambda Function.
Note - Presently MSK with serverless is not supported for SASL authentication, you must use Provisioned option when deplying the MSK cluster.