Does the Lambda Event Source Mapping (ESM) for Kafka support Protobuf?

0

In the past, we were told by AWS Support that Filtering only worked for Kafka topics that use JSON for serialisation. Protobuf and Avro Kafka topics were not supported back then, but AWS did have plans to add that support some time in the future. Worth noting that events can still consumed off serialised topics, but pre-filtering events was not available.

I've tried to find references of this in the AWS docs, but nothing has came up. So I'm interested to know whether Protobuf is now supported, or if there is a timeline when it will be?

asked a month ago60 views
1 Answer
0

Based on the available information, it appears that AWS Lambda Event Source Mapping (ESM) for Kafka does not currently support Protobuf for event filtering. The documentation specifically mentions that self-managed Apache Kafka messages must be UTF-8 encoded strings, either plain strings or in JSON format, for Lambda to apply filter criteria effectively.

For messages that use encodings other than UTF-8, such as Protobuf, Lambda will only process metadata filters and not apply filtering to the message content itself. This means that while you can still consume events from Protobuf-serialized Kafka topics, the pre-filtering capability is limited to metadata properties only.

The current behavior for non-UTF-8 encoded strings (which would include Protobuf) is that Lambda filters only on the metadata properties based on the provided filter criteria, regardless of the filter pattern format specified.

Unfortunately, there is no specific information available about a timeline for adding support for Protobuf or other serialization formats for event filtering. AWS has not publicly announced plans or timelines for expanding the filtering capabilities to include Protobuf support.

If you need to use event filtering with Protobuf-serialized messages, you may need to consider alternative approaches, such as processing the filtering logic within your Lambda function after receiving the events, or transforming the data to a supported format before it reaches the Lambda ESM.
Sources
Using event filtering with a self-managed Apache Kafka event source - AWS Lambda

profile picture
answered a month ago
AWS
SUPPORT ENGINEER
reviewed 24 days 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.

Guidelines for Answering Questions