Lambda triggered twice by one dynamodb insert event

0

I have a lambda function which is triggered by Dynamo stream when a record is inserted into a table. The function takes about 2~3 minutes to process the request and the batch size for the trigger is configured to be 1.

For some reason, the lambda function is triggered twice for every record inserted into a table. For instance, I inserted 100 records into the table and found out that the lambda function was triggered 200 times.

Below is the screenshot from CloudWatch which shows the lambda function is triggered twice for the same pk inserted into the dynamodb table.

Enter image description here

  • Did you setup two triggers (look on the console)? Or did you actually somehow insert twice (to check you can look at CW and look at consumed WRUs)?

asked a year ago709 views
1 Answer
0

Are you using global tables? If so, you can see duplicated itens in the streams

profile pictureAWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions