I intend to reboot a running AWS instance which has been marked as unhealthy behind an ELB.

I have a setup where 2 instances are behind a Load Balancer and one of them contains lot of (>200 Gb) data in ephemeral store. The data is not important so I don't want to put it in S3 or EBS and pay for it but I don't want to lose it either.

Is there a way to tell load balancer to detect unhealthy instances and hard reboot them instead of terminating?

  • 2
    If you don't want to lose your data, then it is important. Dec 28, 2011 at 9:24
  • It is kind of data for which I don't need 99.99...% availability and yet I don't want to delete often. Ephemeral storage fits this kind of need. Dec 28, 2011 at 9:48
  • 1
    Ephemeral storage may disappear at any moment outside of your control, such as when an instance fails. If you don't want to lose your data, put it somewhere persistent and not ephemeral. If you put important data on ephemeral storage, it should be easy to recreate from other sources. Dec 28, 2011 at 11:09

3 Answers 3


Not able to make comments yet, but one important point, enabling termination protection will NOT stop an AutoScaling Group from terminating an instance

The DisableApiTermination attribute does not prevent Amazon EC2 Auto Scaling from >terminating an instance


  • Configure alarm depends on ELB metrics to inform you of UnhealthyChecks
  • You can ban terminating of the machine by enabling Termination Protection Enable/ Disable Termination Protection

  • You can save your AMI template and make sure that Autoscalling would open you a similar instance


Using cloud watch, you can set custom action by creating a http endpoint to reboot your instance.You can write a http endpoint(simple servlet) to receive and initiate action as per your need.Clouw watch will send a notification to your endpoint once it detects that your instance is unhealthy.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.