Posted On: Apr 5, 2023

Amazon Lambda now supports setting Maximum Concurrency to the Amazon SQS event source, which allows customers to control the maximum concurrent invokes by the Amazon SQS event source. When multiple Amazon SQS event sources are configured to a function, customers can control the maximum concurrent invokes of an individual SQS event source. 

Amazon Lambda makes it easier to consume events from Amazon SQS at scale. A Lambda function subscribes to an SQS queue using an event source mapping (ESM). The ESM consists of processing instances that poll the queue for messages and invoke Lambda function. Processing instances scale up when there are more messages to process, and scale down when the number of messages in the queue drop or when they encounter function errors. 

Previously, customers looking to limit the maximum concurrent invokes by the ESM needed to set a reserved concurrency limit which would limit the concurrency used by the function, but at the cost of less consistent throughput and retrying messages due to function throttling. This new control on the event source mapping directly limits the number of concurrent invokes without customers having to configure reserved concurrency to perform a similar action. 

You can get started with Maximum Concurrency for Amazon SQS via the Amazon Web Services Management Console, Amazon CLI, Amazon Serverless Application Model (SAM), or Amazon SDK for Lambda in Amazon Web Services China (Beijing) Region, operated by Sinnet, and Amazon Web Services China (Ningxia) Region, operated by NWCD.