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

feita há um ano734 visualizações
1 Resposta
0

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

profile pictureAWS
respondido há um ano

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas