Posted On: Nov 5, 2020
AWS 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 AWS Management Console, AWS CLI, AWS SAM, or AWS SDK for Lambda. Amazon MQ as a Lambda event source is available in all AWS Regions where both AWS Lambda and Amazon MQ are available. 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 and the AWS Compute Blog.