Skip to content

Instantly share code, notes, and snippets.

@arfon
Created January 6, 2013 20:12
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/4469842 to your computer and use it in GitHub Desktop.
Save arfon/4469842 to your computer and use it in GitHub Desktop.
Spotty Process: Get all instances in a given availability zone
// Request using availability zone codes
// curl http://spot.arfon.org/availability_zones/us-east-1b
// Example response below
[{
"availability_zone": "us-east-1b",
"current_price": 0.0635,
"id": "50c070e7884b630002000005",
"name": "m3.xlarge",
"pricing_history": {
"2012-12-06 10:10:15 UTC": "0.063500"
},
"product_description": "SUSE Linux"
}, {
"availability_zone": "us-east-1b",
"current_price": 0.07,
"id": "50b196d2a2fc8eef1000004b",
"name": "m2.xlarge",
"pricing_history": {
"2012-11-23 20:04:26 UTC": "0.070000",
"2012-11-24 20:06:02 UTC": "0.070000",
"2012-11-25 20:06:27 UTC": "0.070000",
"2012-11-26 20:09:25 UTC": "0.070000"
},
"product_description": "Windows (Amazon VPC)"
}, {
"availability_zone": "us-east-1b",
"current_price": 0.07,
"id": "50b196d5a2fc8eef10000080",
"name": "m2.xlarge",
"pricing_history": {
"2012-11-23 20:04:12 UTC": "0.070000",
"2012-11-24 20:05:43 UTC": "0.070000",
"2012-11-25 20:06:08 UTC": "0.070000",
"2012-11-26 20:09:01 UTC": "0.070000"
},
"product_description": "Windows"
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment