英文:
DynamoDB generates multiple INSERT events for the same record
问题
我弄清楚了,记录被删除然后重新创建,我以为它只是被更新了。
英文:
There is a Lambda that processes INSERT events received from a DynamoDB table stream, the table has a single attribute HASH, let's say RecordId.
Now once a record is created and quickly after updated by PutItem command, it generates multiple INSERT events though the following events should UPDATE events.
BTW, if it could be related, the record have a 24-hour later ttl attribute.
Also, I cannot reproduce this, I am just concluding it based on the Lambda execution logs.
ANSWER:
figured it out, the record was deleted and re-created, I though it was just updated.
答案1
得分: 0
DynamoDB Streams 提供了事件的确切一次传递,没有重复。但是,话虽如此,您的 Lambda 函数可以自由地重试事件两次,这会在执行日志中显示两次。从本质上讲,由您来确保您的 Lambda 函数是幂等的。
英文:
DynamoDB streams provides you exactly once delivery of an event, there are no duplicates. But, with that said you Lambda is free to retry an event twice which would show it twice in your execution logs. In essence, it's up to you to ensure your Lambda function is idempotent.
答案2
得分: 0
弄清楚了,记录已被删除并重新创建,我原以为只是更新了。
英文:
Figured it out, the record was deleted and re-created, I though it was just updated.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论