Why is my Spot Instance terminating even though the Spot price doesn't exceed the maximum price?

Last updated: 2020-05-18

My Spot Instance is below the maximum price set in my Spot request. Why did Amazon Elastic Compute Cloud (Amazon EC2) terminate my Spot Instance?

Resolution

Amazon EC2 terminates your Spot Instance for the following reasons:

  • The Spot price is above the maximum price.
  • There isn't enough capacity.
  • Amazon EC2 can't meet the constraints you placed on your Spot request.

Note: Amazon EC2 terminates Spot Instances by default. You can change the default behavior to hibernate or stop the instance instead. For more information, see Interruption behavior.

Termination due to a lack of capacity

Amazon EC2 might interrupt or terminate Spot Instances because Amazon EC2 doesn't have capacity in the Spot Instance pool.

To check if Amazon EC2 terminated your Spot Instance because of a lack of capacity:

  1. Open the Amazon EC2 console, and then select Spot Requests.
  2. Choose the terminated Spot Instance.
  3. View the Status field on the Description tab. If Amazon EC2 didn’t have enough capacity, the Status field displays a message similar to the following:
    "Instance-terminated-no-capacity | Message : Your Spot Instance was terminated because there is no Spot capacity available that matches your request."

If your original Spot request was a one-time Spot request, create a new Spot request. If your original Spot request was a persistent Spot request, Amazon EC2 launches a new Spot Instance when capacity is available.

Termination due to constraints on the Spot request

If you choose constraints for your Spot request that Amazon EC2 can't meet, Amazon EC2 terminates your Spot Instance. Update your Spot request to change or remove the constraints, or create a new Spot request.

Note: To get a notification before Amazon EC2 terminates your instance, set up a Spot Instance interruption notice.


Did this article help you?

Anything we could improve?


Need more help?