Search code examples
amazon-web-serviceseventsaws-lambdastreamamazon-dynamodb

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.


Solution

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