The new spot instances on EC2 are a great way to get some extra compute power at a price you can live with, especially if you are flexible on exactly when the instances run. On the other hand maybe you won’t get the compute power if the spot instance price never drops to the max price you are willing to pay.
The best way to approach auction type situations like this is often to simply list the maximum price you can afford. Your instance(s) will get run if and when the spot instance price reaches that price and you will regularly get charged less depending on what other users are bidding for their instances.
Though I don’t recommend trying to chase the spot instance price around, it is natural to be curious about what others have been paying and whether or not you might have a chance to get in with your bid.
The ec2-describe-spot-price-history command lists the historical values of the spot instance price for all sizes and types of instances. This is useful for studying fluctuations over time, but sometimes you’ll just want to know what the latest spot instance price is, even though this is not necessarily the price you would get charged if you opened new spot instance requests.
The following command shows the most recent spot instance price for each size of the Linux instances:
ec2-describe-spot-price-history -d Linux/UNIX |
sort -rk3 |
perl -ane 'print "$F[1]\t$F[3]\n" unless $seen{$F[3]}++' |
sort -n
To check the spot price in a different region, simply add an option like
--region us-west-1
or
--region eu-west-1
As of the writing of this article, the prices returned for the us-east-1 region are as follows:
0.026 m1.small
0.05 c1.medium
0.11 m1.large
0.25 c1.xlarge
0.265 m1.xlarge
0.443 m2.2xlarge
0.997 m2.4xlarge
The exact spot instance prices will vary significantly from these samples over time and likely even during the course of a day. In fact, the spot instance price may occasionally exceed the on demand (standard) EC2 instance price.
Who’s going to be the first person to provide handy, real time, spot price history graphs by EC2 region, instance class (Linux/Windows), and instance type with correct X-axis date/time scaling?
Good luck bidding!


i have plotted the spot price for an m1.small instance over the last two weeks:
http://www.flickr.com/photos/tlossen/4185350530/
Eric, what would stop someone from bidding $0.09 (or similar) for an instance they hope remains ON? Can I associate an elastic IP etc.?
your wish is my command ;)
--> http://www.cloudexchange.org
(updated every 5 minutes)
danhixon: I'm not sure I understand the question. If you want an instance which remains on, just start a normal on-demand instance and leave it running.
You can't associate an elastic IP address with a spot instance request, but after the spot instance starts, it could automatically associate an elastic IP address with itself if you configure it to do so.
Tim: Nice! Here are some more requests:
1. Instead of drawing a diagonal line between price points, show each price as a horizontal line until a new price change comes in to play.
2. Always show the current date/time at the right edge of the chart so that we can see graphically how long the current price has been active.
right ... much better now. :)
I put "DIY Amazon EC2 Spot Instances price chart " - http://bit.ly/8ws8vt short tutorial linking back to your article. Let me know if you find it useful.
We also have some statistics on EC2 at TheCloudMarket
http://thecloudmarket.com/stats
TheCloudMarket.com has created a spot price chart which includes the ability to compare price history across different types and regions:
http://thecloudmarket.com/stats#/spot_prices
[Update: Heh, I noticed this feature and posted the comment before I noticed Philip's blog comment in the approval queue.]
You can also get a graphical view of the latest spot prices in the AWS Management Console... handy...
Another: http://www.spothistory.com/