- Newest
- Most votes
- Most comments
Have you considered using Step Functions? One of the workflow states is "wait": https://docs.aws.amazon.com/step-functions/latest/dg/state-wait.html - after waiting you could then trigger the Lambda function.
Hello,
When the state of an Amazon Machine Image (AMI) changes, Amazon EC2 generates an event that is sent to Amazon EventBridge. The events are sent to the default EventBridge event bus in JSON format. You can use Amazon EventBridge to detect and react to these events. You do this by creating rules in EventBridge that trigger an action in response to an event. For example, you can create an EventBridge rule that detects when the AMI creation process has completed and then invokes an Amazon SNS topic to send an email notification to you.
You can get detail from this link: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitor-ami-events.html
Relevant content
- Accepted Answerasked 4 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated a year ago
This solution is better because it will only trigger when the AMI has been created and is complete.l and you won’t need your delay and the snapshot will be complete. Don’t use cloud watch rules. Use event bridge rule