Posted On: Mar 10, 2022

Amazon Lambda now supports Amazon Managed Streaming for Apache Kafka (Amazon MSK) as an event source, giving customers more choices to build serverless applications with streaming data. Customers can build Apache Kafka consumer applications with Lambda functions without needing to worry about infrastructure management. Amazon MSK is a fully managed service that makes it easy to build and run applications that use Apache Kafka to process streaming data.

Lambda makes it easy to process data streams from Amazon Kinesis Data Streams or Amazon DynamoDB Streams. Now, customers can also build applications triggered from Apache Kafka topics using Amazon MSK. Messages are processed in batches of up to 10,000 records, which may contain messages from one or more partitions, up to a maximum payload size of 6MB. Messages within a partition are always processed in order.

To get started, select the Amazon MSK topic as the event source for your Lambda function through the Amazon Web Services Management Console, Amazon CLI, Amazon SAM, or Amazon SDK for Lambda. Amazon MSK as a Lambda event source is available in Amazon Web Services China (Beijing) Region, operated by Sinnet, and Amazon Web Services China (Ningxia) Region, operated by NWCD. This feature requires no additional charge to use. You pay for the Lambda invocations triggered by an Apache Kafka topic. To learn more about building an Apache Kafka consumer application with Lambda, read the Lambda Developer Guide.