2 Answers
- Newest
- Most votes
- Most comments
3
Use a Step Function. A Wait state allows the step function to wait for a specified time interval - https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-wait-state.html
You can then create a Task to invoke the lambda function - https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-task-state.html
2
You can't really wait for a Lambda function to be executed. You need to define what is the trigger that invokes the function. I am not sure what exactly you are trying to do, but I think you have a few options:
- You can use EventBridge scheduled events if you need to invoke a function on some schedule.
- Send a delayed messages to SQS with a Lambda trigger.
- Launch a state machine and use a wait state.
Relevant content
- asked a year ago
- asked 6 months ago
- asked a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 21 days ago
I'm curious, why do you need to include a 5-second wait between sending to the other bucket?