Posted On: Jul 25, 2023
Amazon Lambda event source mappings now support additional filtering capabilities including the ability to match against characters at the end of a value (suffix filtering), to ignore case sensitivity (equals-ignore-case), and to have a single rule match if any conditions across multiple separate fields are true (OR matching). We are also increasing the bounds supported for numeric values to -5e9 to 5e9 from -1e9 to 1e9. With these new enhanced capabilities, you can now write complex rules that provide additional filtering options when building event-driven applications.
The provided filtering capabilities filter out messages before batching, which helps you lower costs by including only meaningful data in each Lambda invocation. The new filtering capabilities further decrease the need to manage custom filters inside Lambda functions. For example, you could have a Kafka stream of recently uploaded document metadata; you can now filter on that metadata to only process messages referencing documents ending in ".pdf" or ".docx".
The enhanced filtering capabilities are available at no additional charge for the Amazon SQS, Amazon Kinesis, Amazon DynamoDB, Amazon MSK, Self-managed Apache Kafka, and Amazon MQ event source mappings in Amazon Web Services China (Beijing) Region, operated by Sinnet, and Amazon Web Services China (Ningxia) Region, operated by NWCD. To learn more, see the event filtering sections in the Lambda Developer Guide.