jeweloh
jeweloh

Reputation: 21

Will inserting a duplicate item in DynamoDB trigger Lambda or send a Change Data Capture CDC event in DynamoDB streams?

If I'm writing an item that is exactly the same as another item in DynamoDB, will it trigger Lambda or send a Change Data Capture (CDC) event to DynamoDB streams?

I know that it will overwrite the data since it will have the same partition and sort keys, but I am not sure if that will trigger Lambda or be its own CDC event. The data is exactly the same.

For context, I don't want my Lambda to trigger when an item that is completely the same as an existing item in DynamoDB is written.

EDIT: Answer: If you insert a record that is exactly the same as an existing record, it will neither trigger Lambda nor send a CDC event to DynamoDB streams.

Upvotes: 2

Views: 978

Answers (1)

Leeroy Hannigan
Leeroy Hannigan

Reputation: 19813

If the items are the same then it will not trigger an event to the stream. For an event to be triggered at least one value will need to have been changed to record a change capture event.

Upvotes: 2

Related Questions