I am trying to setup auto-healing for my EC2 instance. So whenever my instance goes down or is unreachable, it should auto reboot or launch a new instance preferrably in a different AZ in the same AWS region.
I looked into setting up cloudwatch alarm and adding action to reboot the instance in case of failure. This works well if I want my EC2 instance to just reboot in case of failure.
But it doesn't cover the case where AZ itself is not reachable. So I am trying to setup AWS autoscaling group with min/max instance number as 1. In case of failure I want new instance to be launched with EBS volume of terminated instance. How do I go ahead with this?
Or if there is an alternate way to achieve what I want, that would be appreciated too.