Posted On: Mar 10, 2022

Amazon Lambda now supports Amazon MQ for Apache ActiveMQ as an event source to give customers more choices for messaging services to use with their serverless application. Amazon MQ is a managed message broker service for Apache ActiveMQ that makes it easy to set up and operate message brokers in the cloud. Customers can build applications quickly and easily with Lambda functions that are invoked based on messages posted to Amazon MQ message brokers without needing to worry about provisioning or managing servers.

Lambda supports messaging event sources such as Amazon Simple Queue Service (SQS) and Amazon Simple Notification Service (SNS). Now, it is also easy to read from Amazon MQ message brokers and process messages without needing to create and manage a consumer application that monitors Amazon MQ queues for updates. The Lambda function is invoked when the messages exceed the batch size or the payload exceeds 6MB. Lambda manages connectivity with the Amazon MQ message broker on the customer's behalf, including managing authentication, authorization, scaling, monitoring, and failure handling.

To get started, select your Amazon MQ for ActiveMQ message broker 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 MQ 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 incurs no additional charge. You pay for the Lambda invocations triggered by an Amazon MQ queue. To learn more about building an Amazon MQ consumer application with Lambda, read the Lambda Developer Guide.