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

posta un anno fa734 visualizzazioni
1 Risposta
0

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

profile pictureAWS
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande