Why did Amazon EC2 terminate my instance?
Last updated: 2021-09-21
Why did Amazon Elastic Compute Cloud (Amazon EC2) terminate my instance?
View your AWS CloudTrail logs:
- Open the CloudTrail console.
- Choose Event history.
- Select Event Name in the Filter dropdown list, and then enter TerminateInstances to view all instance termination API calls.
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 is 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?