onlyvix.blogspot.com
onlyvix.blogspot.com

Reputation: 347

ec2 spot complete price history

I am using API to get ec2 spot price history, but I cannot get anything except for last 90 or so days, and cannot specify frequency of observations. Is there a way to get a complete history of spot prices, preferable at minute or hourly frequency?

Upvotes: 9

Views: 6623

Answers (3)

James Swarowski
James Swarowski

Reputation: 29

This website has re-sampled EC2 spot price histories for some regions, you may access them via a simple API directly from your Python script:

http://ec2-spot-prices.ai-mmo-games.de/

I hope this helps.

Upvotes: 0

karan
karan

Reputation: 1

AWS only provides 90 days of history. And the data is raw, i.e., not normalized by hour or even minute. so there are holes in the data sometimes.

One approach would be to suck in the data into an ipython notebook and use pandas excellent time series tools to resample by minute or 5-min etc. here's a short tutorial:

https://medium.com/cloud-uprising/the-data-science-of-aws-spot-pricing-8bed655caed2

here are more details on using pandas for time-series resampling:

http://pandas.pydata.org/pandas-docs/stable/timeseries.html

hope that helps...

Upvotes: 0

Steffen Opel
Steffen Opel

Reputation: 64751

While not explicitly documented for the DescribeSpotPriceHistory API action, this restriction is at least mentioned for the AWS Management Console (which uses that API in turn), see Viewing Spot Price History:

You can view the Spot Price history over a period from one to 90 days based on the instance type, the operating system you want the instance to run on, the time period, and the Availability Zone in which it will be launched.

  • Since anybody could have retrieved and logged the entire spot price history ever since this API is available (and without a doubt quite some users and researchers have done just that; even the AWS blog listed some dedicated Third-Party AWS Tracking Sites, but these are all defunct at first sight), this restriction admittedly seems a bit arbitrary, but is certainly pragmatic from a strictly operational point of view, i.e. you have all the information you need to base future bids upon (esp. given AWS has only ever reduced prices so far, and regularly does so in fact much to the delight of its customers).

Likewise there's no option to change the frequency, so you'd need to resort to client side code for the hourly aggregation.

Upvotes: 6

Related Questions