Need to invoke lambda when record inserted to dynamoDB table, But here i need to invoke lambda after 60 seconds of record insertion, is there any way that invoke lambda after n seconds?
Invoking Lambda when record inserted to dynamoDB
2.2k Views Asked by Narendar Reddy M At
3
There are 3 best solutions below
0

You could trigger a lambda that writes your DynamoDB events to a SQS Queue, which is getting polled by your initial lambda. Then you could customize the polling intervall and therefore the duration your lambda gets invoked after something was inserted into the table.
0

You can achieve such behavior with AWS StepFunctions. There is a special "wait" state, which is used to delay before next step.
So the idea is that state machine is launched in response to a new DynamoDB record, then it transits to the "wait" step (60 sec) and then transits to a "task" step with your lambda function.
To solve this in a "scalable" manner I would use the following AWS products:
The process would look like this: