Why did Amazon EC2 interrupt my Spot Instance?

3 minute read
0

I launched a Spot Instance but now I can't find it in the Amazon Elastic Compute Cloud (Amazon EC2) console. Or, my Amazon EMR node Spot Instance was terminated.

Resolution

Amazon EC2 can interrupt your Spot Instance at any time with a two-minute notice for the following reasons:

  • Lack of Spot capacity: Amazon EC2 usually interrupts your Spot Instance to repurpose the spare capacity. Amazon EC2 might also interrupt your instance for issues such as host maintenance or hardware decommission.
  • The Spot price is higher than the maximum price that you set: When you request a Spot Instance, you can specify a maximum price for the instance. The default maximum price is the On-Demand price for the instance type. Your Spot Instance is interrupted when the Spot price exceeds your maximum price.
  • Amazon EC2 can't meet your Spot Instance request constraints: Some Spot requests include constraints, such as a specific launch group or Availability Zone group. Your Spot Instance is interrupted when a constraint can't be fulfilled.

An interrupted Spot Instance stops, hibernates, or terminates, depending on the Spot request interruption behavior.

To determine why Amazon EC2 interrupted your Spot Instance, get your Spot request status information or find your interrupted Spot Instance. For a complete list of reason codes, see Spot request status codes.

To handle interruptions, use Spot Instance interruption notices to create a fault-tolerant application.

Note: To learn more about using Spot Instances in Amazon EMR, see When should you use Spot Instances?

Restore an EC2 Spot Instance

When an EC2 instance terminates, the data on any instance store volumes associated with that instance is deleted. The Amazon Elastic Block Store (Amazon EBS) root volume is automatically deleted by default. You can't automatically recover a terminated or stopped instance.

To restore a Spot Instance, follow one of these procedures:

Important: Amazon EMR termination protection doesn't prevent Spot Instances from terminating. For more information, see Using termination protection.

Related information

Best practices for EC2 Spot

Launching EC2 Spot Instances

Overview of Amazon EC2 Spot Instances

Spot request status

Why is my Spot Instance terminating even though the maximum price is higher than the Spot price?

AWS OFFICIAL
AWS OFFICIALUpdated 9 months ago