Direkt zum Inhalt

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

gefragt vor 9 Monaten131 Aufrufe

1 Antwort
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.

EXPERTE

beantwortet vor 9 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.