Skip to content

Instantly share code, notes, and snippets.

@arfon
Created January 6, 2013 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arfon/4469886 to your computer and use it in GitHub Desktop.
Save arfon/4469886 to your computer and use it in GitHub Desktop.
Spotty Process: Price for a given instance size in a single availability zone
// Request using availability zone codes and instance type codes
// curl http://spot.arfon.org/instances/m1.large/us-east-1b
// Example response below
[{
"availability_zone": "us-east-1b",
"current_price": 0.026,
"id": "50b196d8a2fc8eef100000c0",
"name": "m1.large",
"pricing_history": {
"2012-11-23 20:03:51 UTC": "0.026000",
"2012-11-24 20:05:22 UTC": "0.026000",
"2012-11-25 20:05:42 UTC": "0.026000"
},
"product_description": "Linux/UNIX (Amazon VPC)"
}, {
"availability_zone": "us-east-1b",
"current_price": 0.066,
"id": "50b196dda2fc8eef10000123",
"name": "m1.large",
"pricing_history": {
"2012-11-23 20:01:50 UTC": "0.066000",
"2012-11-24 20:02:23 UTC": "0.066000"
},
"product_description": "Windows"
}, {
"availability_zone": "us-east-1b",
"current_price": 0.032,
"id": "50b196d8a2fc8eef100000c4",
"name": "m1.large",
"pricing_history": {
"2012-11-23 20:03:49 UTC": "0.032000",
"2012-11-24 20:05:21 UTC": "0.032000"
},
"product_description": "SUSE Linux (Amazon VPC)"
}, {
"availability_zone": "us-east-1b",
"current_price": 0.032,
"id": "50b196d2a2fc8eef10000052",
"name": "m1.large",
"pricing_history": {
"2012-11-23 20:04:24 UTC": "0.032000",
"2012-11-24 20:05:58 UTC": "0.032000",
"2012-11-25 20:06:21 UTC": "0.032000"
},
"product_description": "SUSE Linux"
}, {
"availability_zone": "us-east-1b",
"current_price": 0.026,
"id": "50b196cda2fc8eef10000001",
"name": "m1.large",
"pricing_history": {
"2012-11-22 20:04:46 UTC": "0.035000",
"2012-11-22 20:37:48 UTC": "0.026000",
"2012-11-22 20:55:27 UTC": "0.035000"
},
"product_description": "Linux/UNIX"
}, {
"availability_zone": "us-east-1b",
"current_price": 0.066,
"id": "50b196d2a2fc8eef10000047",
"name": "m1.large",
"pricing_history": {
"2012-11-23 20:04:29 UTC": "0.066000",
"2012-11-24 20:06:06 UTC": "0.066000"
},
"product_description": "Windows (Amazon VPC)"
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment