- Newest
- Most votes
- Most comments
It would probably be a better idea to just exclude the instance from the alarm to begin with. You can also shut off the alarm. Unless the idle CPU is an indication of a system problem in that case you may want to handle that a different way. Ex: Auto scaling group with health check.
You can build a solution using DynamoDB and lambda.Log all the instanceid's,state and shutdowntime and trigger the lambda to take action as needed. Note : Also consider shutting down the services running inside the EC2 gracefully to avoid data inconsistency and corruption.
Assuming this is really what you need, you can set an EventBridge rule that will catch the instance terminated events. This event can create an EventBridge schedule for 5 minutes from now that will start the instance.
Relevant content
- asked 2 years ago
- asked a month ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 9 months ago