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)?

gefragt vor einem Jahr734 Aufrufe
1 Antwort
0

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

profile pictureAWS
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen