I am new to AWS & have configured a Cloudwatch alarm to reboot an EC2 instance, if its StatusCheckFailed
fails.
The issue is that, I frequently make updates to the image AMI and need to terminate the old instance and re-launch it with new AMI.
This results in instance id getting changed and thus, the Cloudwatch alarm I initially created (with reference to instance-id)becomes outdated.
What is the best practice to keep the Cloudwatch alarm updated, when the instance-id changes ?
Asked
Active
Viewed 210 times
1

penguin
- 133
- 2
- 15