This guide covers best practices for configuring AWS Lambda event filtering and partial batch responses for Amazon Simple Queue Service (Amazon SQS) event sources. These controls address two common performance pitfalls associated with Lambda’s default message batch processing behavior:
Poison-pill messages that cause a Lambda function to retry entire Amazon SQS message batches multiple times
Irrelevant Amazon SQS events that cause a Lambda function to invoke unnecessarily
By setting up these controls, you can configure your Lambda functions to process Amazon SQS message batches more efficiently and improve your serverless application’s performance.