Posted On: Nov 26, 2021

AWS Lambda now provides content filtering options for SQS, DynamoDB and Kinesis as event sources. With event pattern content filtering, customers can write complex rules so that their Lambda function is only triggered by SQS, DynamoDB, or Kinesis under filtering criteria you specify. This helps reduce traffic to customers’ Lambda functions, simplifies code, and reduces overall cost.

Customers can specify up to 5 filter criteria when creating or updating the event source mappings for their Lambda functions triggered by SQS, DynamoDB or Kinesis. The filters are combined using OR logic by default. In other words, an event/payload meeting any of the filtering criteria defined will be passed on to trigger a Lambda function while an event/payload not matching any of the filtering criteria will be dropped. This feature helps reduce function invocations for microservices that only use a subset of events available, removing the need for the target Lambda function or downstream applications to perform filtering. 

Content filtering is available in all commercial regions that AWS Lambda is available. There is no additional cost for using this feature beyond the standard price for AWS Lambda.

To learn more about the feature, visit the AWS Lambda documentation for event filtering.