Why did Amazon EC2 terminate my instance?

1 minute read

Why did Amazon Elastic Compute Cloud (Amazon EC2) terminate my instance?


On-Demand Instances

View your AWS CloudTrail logs:

  1. Open the CloudTrail console.
  2. Choose Event history.
  3. In the Lookup attributes dropdown list, choose Event name. Then enter TerminateInstances as an event name to view all instance termination API calls.

Spot Instances

If the Spot price increases above your bid price, then capacity is no longer available. Or, if Amazon EC2 can't meet the Spot request constraints, then the Spot Instance terminates.

For more information, see Spot Instance interruptions.

Instances in an Amazon EC2 Auto Scaling group

Amazon EC2 Auto Scaling might terminate instances in an Auto Scaling group for the following reasons:

  • The instance is marked as unhealthy.
  • The instance exceeded its specified keep-alive parameters.
  • There's an Auto Scaling group scale down event.

Note: By default, AWS Elastic Beanstalk environments use Auto Scaling groups to launch EC2 instances.

For more information, see Why did Amazon EC2 Auto Scaling terminate an instance?

Related information

My Spot Instance was terminated. Can I recover it?

How do I re-create a terminated EC2 instance?

AWS OFFICIALUpdated a year ago