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?

已提問 1 年前檢視次數 131 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南