AWS News Blog

Amazon EC2 Spot Instance Bid Status

We want to make EC2 Spot Instances even easier to use. One way we are doing this is by making the bidding and processing more open and more transparent.

You probably know that you can use Spot Instances to bid for unused capacity, allowing you to obtain compute capacity at a price that is based on supply and demand.

When you submit a bid for Spot capacity, your request includes a number of parameters and constraints. The constraints provide EC2 with the information that it needs to satisfy your bid (and the other bids that it is competing with) as quickly as possible. EC2 stores and then repeatedly evaluates the constraints until it is able to satisfy your bid. The following constraints (some mandatory and some optional) affect the evaluation process:

  • Max Price – The maximum bid price you are willing to pay per instance hour.
  • Instance Type – The desired EC2 instance type.
  • Persistent – Whether your request is one-time or persistent.
  • Request Validity Period – The length of time that your request will remain valid.
  • Launch Group – A label that groups a set of requests together so that they are started or terminated as a group.
  • Availability Zone Group – A label that groups a set of requests together so that the instances they start will launch in the same Availability Zone.
  • Availability Zone – An Availability Zone target for the request.

Spot Life Cycle
Each bid has a life cycle with multiple states. Transitions between the states occur when constraints are fulfilled. Here’s the big picture:

We want to give you additional information so that you can do an even better job of making Spot Bids and managing the running instances. You might find yourself wondering:

  • Why hasn’t my Spot Bid been fulfilled yet?
  • Can I change something in my Spot Bid to get it fulfilled faster?
  • Why did my Spot Instance launch fail?
  • Is my Spot Instance about to be interrupted?
  • Why was my Spot Instance terminated?

Spot Instance Bid Status
In order to give you additional insight in to the evaluation process, we are making the Spot Bid Instance Status visible through the AWS Management Console and the EC2 APIs. The existing DescribeSpotInstanceRequests function will now return two additional pieces of information – bidStatusCode and bidStatusMessage.This infomation is updated every time the Spot Bid’s provisioning status changes or is re-evaluated (typically a few seconds, but sometimes up to 3 minutes).

  • bidStatusCode is designed to be both machine-readable and human-readable.
  • bidStatusMessage is human-readable. Each bidStatusCode has an associated message:

You can find the complete set of codes and messages in the Spot Instance documentation. Here are some of the more interesting codes:

  • pending-evaluation – Your Spot request has been submitted for review and is pending evaluation.
  • fulfilled – Your Spot request is fulfilled and the requested instances are running.
  • marked-for-termination – Your Spot Instance is marked for termination because the request price is lower than the fulfillment price for the given instance type in the specified Availability Zone.

You can click on the Bid Status message in the AWS Management Console to see a more verbose message in the tooltip:

What is $100 Worth of Spot Good For?
If you are wondering about the value of Spot Instances, the new post, Data Mining the Web: $100 Worth of Priceless, should be helpful. The developers at Lucky Oyster used the Common Crawl public data set, EC2 Spot Instances, and a few hundred lines of Ruby to data mine 3.4 billion Web pages and extract close to a Terabyte of structured data. All in 14 hours for about $100.

Learn About Spot
I recently interviewed Stephen Elliott, Senior Product Manager on the EC2 team, to learn more about the Spot Instances concept. Here’s our video:

Stephen and his team are interested in your feedback on this and other Spot Instance features. You can email them at spot-instance-feedback@amazon.com .

If you are new to Spot Instances, get started now by signing up for EC2 and watching our HOWTO video. To learn even more, visit our EC2 Spot Instance Curriculum page.

— Jeff;

 

Jeff Barr

Jeff Barr

Jeff Barr is Chief Evangelist for AWS. He started this blog in 2004 and has been writing posts just about non-stop ever since.