amazon ec2 spot pricing history

2021-01-08: Updated links and information in Dataset.

2020-09-30: Updated links and information in Dataset.

2017-02-07: I’ve been updating some code to pull and archive EC2 spot price history. It’s available on GitHub. (Contributions welcome!)

Amazon EC2 has a neat feature called spot pricing which allows you to “bid” on the ceiling of what you want to pay for an instance per compute hour. Spot pricing allows Amazon to lease their virtual machines at a lower price when there is excess capacity to capture some revenue (as opposed to nothing when machines run idle).

The on-demand price of a t1.micro instance on us-east-1 is about $0.02/hour; spot pricing is usually around $0.004/hour. Prices are updated somewhat arbitrarily but presumably they will raise prices high enough to shut instances down for customers who will pay the on-demand price.

For example, knowing that spot prices are at $0.004, I might set a bid (the maximum I want to pay) at $0.01. My instance will be shut down without warning if Amazon changes the price to $0.02. You could hedge your bets and hope to ride out any surges in pricing (if you needed the uptime) by increasing your bid to $0.05 or higher, but it’s possible you’d end up paying a lot more.

Since Amazon (as far as I know) doesn’t have a visualization of historical pricing, I used their API tools and did a quick graph of the t1.micro instance type on us-east-1. Each different colored line corresponds to a different availability zone; the lines have been smoothed for niceness, so I also plotted as points the mins and maxes (over the entire time period).

graph of historical spot prices for t1.micro on us-east-1

Overall it seems like there’s a lot of opportunity to utilize these instances for a lot cheaper than their on-demand pricing, though we see a good number of days where pricing peaks at $0.08: four times the on-demand cost!

Not quite sure what happened at the end of October to early November; I wonder if this affected the ability to create on-demand instances as well.

(I was originally planning to have some sort of live tracker, which I plan to do once I get around to it. Source code coming soon once I clean it up, or you can send me an email and I’ll send you what I have.)



Please see the ec2-spot-price dataset page.