skip to Main Content

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.

2

Answers


  1. Chosen as BEST ANSWER

    Figured it out, the record was deleted and re-created, I though it was just updated.


  2. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search