- 最新
- 最多得票
- 最多評論
DynamoDB Streams provides exactly once delivery of events to the streams. However, Lambda does not have such guarantees. Lambda provides at least once processing, meaning it can retry the same DynamoDB Stream batch more than once, giving you the illusion that there were duplicates in the stream.
When using a parallelisation factor of more than one, it does not change any of the above semantics. Each invocation works on a different batch in the stream, but again retries could happen.
If duplicates are an issue, you must ensure that your Lambda processes with idempotency in mind for your downstream consumers. Lambda Powertools has some useful Idempontency features which you can look into: https://aws.amazon.com/blogs/compute/handling-lambda-functions-idempotency-with-aws-lambda-powertools/
Lambda guarantees at least once delivery of events, so even without parallelization factor, you can get the same event twice. Saying that, PF does not introduce additional duplicates.
相關內容
- 已提問 6 個月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前