Skip to content

Lambda filter criteria for Apache kafka ESM

0

I have a lambda with Apache kafka ESM and I will get a json data from the Kafka. I need to filter criteria for this json look like {"third-party":"yes","foo":"bar"} When the incoming json has third-party I need to ignore that record that record need not invoke lamba and when the key itself not there that record need to invoke the lambda so give the filter pattern for this scenario

asked 8 months ago130 views

1 Answer
0

You can achieve this with an event source mapping filter pattern that excludes records containing "third-party":"yes" and allows records where the key is absent. The filter pattern should check the value field of the Kafka message (since Lambda filtering for Kafka only supports the value key) and use a not-equals condition.

EXPERT

answered 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.