Why did Amazon Elastic Compute Cloud (Amazon EC2) terminate my instance?
View your AWS CloudTrail logs:
- Open the CloudTrail console.
- Choose Event history.
- In the Lookup attributes dropdown list, choose Event name. Then enter TerminateInstances as an event name 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'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?
My Spot Instance was terminated. Can I recover it?
How do I re-create a terminated EC2 instance?