Enhanced Fan-Out + Consumer + Lambda

0

I have a Kinesis Data Stream with 3 shards: 0001, 0002 and 0003. I have registered a Consumer in the data stream. I have 2 shard subscriptions, one for consumer 1 and shard 0001, and the other for consumer 2 and shard 0002. I have 2 lambda functions, one has as a trigger the data stream with consumer 1, and the other has as a trigger the data stream with consumer 2. According https://docs.aws.amazon.com/streams/latest/dev/enhanced-consumers.html says: "If you use the API to build a consumer that uses enhanced fan-out, then you can subscribe to individual shards."

When the lambda functions run, they read records from all the shards, not the one that is assigned to the consumer. How I can use EFO + consumers + shard subscription + lambda function to read records from a particular shard?

Any clue?

  • Is there a specific reason to assign a specific shard to a lambda function?

asked a year ago127 views
No Answers

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