My Amazon EC2 instance was terminated by Auto Scaling because of the failure of a status check or health check. I need to take steps to prevent this happening in the future.

An EC2 instance can be terminated by Auto Scaling if the instance fails an EC2 status check or a load balancer health check. When an instance is terminated by Auto Scaling, an error similar to the following is generated in the scaling history. (In the Amazon EC2 console, in the navigation pane, under Auto Scaling, choose Auto Scaling Groups. Select an Auto Scaling group, and then choose the Activity History view.)

  • At 2015-06-01T14:23:26Z an instance was taken out of service in response to a EC2 instance status checks failure.

-or-

  • At 2015-07-13T18:42:21Z an instance was taken out of service in response to a ELB system health check failure.

EC2 status checks are based on the following criteria:

  • System status checks: for issues related to the underlying host.
  • Instance status checks: for issues related to the health of your specific instance.

If an EC2 instance fails both system and instance status checks, Auto Scaling terminates the affected instance and replaces it with a new instance on different underlying hardware. If you consistently experience instance status check failures, you should update your launch configuration to use a working AMI and then launch an EC2 instance from your non-working AMI for troubleshooting purposes. For more information, see Troubleshooting Instances with Failed Status Checks.

If you have created a load balancer health check, your instances must generate an HTTP 200 response within the timeout period specified for the health check. If the timeout period elaspes without generating an HTTP 200 response, the load balancer is designated as unhealthy, and Auto Scaling terminates the instance. For more information, see Troubleshooting Elastic Load Balancing: Health Check Configuration.

Note: Typically, new EC2 instances require time to warm up before they can pass a status or health check. An Auto Scaling launch configuration has a configurable health check grace period property that specifies the number of seconds that must elapse before Auto Scaling begins health checks of the instance. Make sure that you set the health check grace period to a value sufficient for your application to start. The health check grace period starts upon completion of the EC2 system status and instance status health checks. For more information, see Add an Elastic Load Balancing Health Check to Your Auto Scaling Group.

Auto Scaling, terminate, health check, Elastic Load Balancing, ELB, Amazon EC2, system status check, instance status check


Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center.