Software vendors using Amazon Web Service's Elastic Compute Cloud are faced with understanding different EC2 offerings and their costs.
This RESTful web service returns both AWS EC2 on-demand and reserved instance offering descriptions which include both fixed and monthly costs. Marketplace and spot instance offerings are excluded. It obtains its information in the following manner ...
- Reserved instance offering information is obtained from AWS via DescribeReservedInstanceOfferings calls. While information is cached on the awsec2offering server, cached results are purged every 24 hours.
- On-demand instance offering information is not available via the AWS SDK. Therefore it has been hand transcribed from the AWS EC2 Pricing page into a JSON file on GitHub which the awsec2offering server accesses over the internet. This information is also purged every 24 hours. If you notice price changes, please contribute by ...
- Posting it as an issue, or better yet,
- Modifying aws-ec2-ondemand.json and send a pull request.
The URI used to request EC2 instance offering descriptions takes this form ...
http://<host>/awsec2offering/api/<availabilityZone>/<productDescription>/<offeringType>/<instanceType>{,<instanceType>}
- <host> is the server. A permanent host has not yet been selected. It is temporarily hosted at
p1software-eb1.elasticbeanstalk.com
. - <availabilityZone> if omitted, defaults to
us-east-1
. - <productDescription> if omitted, defaults to
linux
. Recognized values are:linux
" (abbreviation of "Linux/UNIX")linuxvpc
(abbreviation of "Linux/UNIX VPC")windows
(abbreviation of "Windows")windowsvpc
(abbreviation of "Windows VPC")
- <offeringType> if omitted, is treated as a wildcard. Recognized values are:
light
(abbreviation of "Light Utilization")medium
(abbreviation of "Medium Utilization")heavy
(abbreviation of "Heavy Utilization")
- <instanceType> if omitted, is treated as a wildcard. Multiple instance types may be specified using a comma separator. Consult the AWS pricing page for the recognized instance types.
This sample URL requests instance descriptions in us-east-1a
for heavy
utilization linux
servers in both t1.micro
and m1.small
instance types.
The returned result is a JSON object whose ec2offerings value is an array of EC2 descriptions (pretty printed here) like this ...
{"ec2offerings":
[{"availabilityZone":"us-east-1a","offeringType":"On-Demand","instanceType":"t1.micro","productDescription":"Linux/UNIX","duration":0,"currencyCode":"USD","fixedPrice":0.0,"hourlyPrice":0.02}
,{"availabilityZone":"us-east-1a","offeringType":"Heavy Utilization","instanceType":"t1.micro","productDescription":"Linux/UNIX","duration":94608000,"currencyCode":"USD","fixedPrice":100.0,"hourlyPrice":0.0050}
,{"availabilityZone":"us-east-1a","offeringType":"Heavy Utilization","instanceType":"t1.micro","productDescription":"Linux/UNIX","duration":31536000,"currencyCode":"USD","fixedPrice":62.0,"hourlyPrice":0.0050}
,{"availabilityZone":"us-east-1a","offeringType":"On-Demand","instanceType":"m1.small","productDescription":"Linux/UNIX","duration":0,"currencyCode":"USD","fixedPrice":0.0,"hourlyPrice":0.06}
,{"availabilityZone":"us-east-1a","offeringType":"Heavy Utilization","instanceType":"m1.small","productDescription":"Linux/UNIX","duration":94608000,"currencyCode":"USD","fixedPrice":257.0,"hourlyPrice":0.012}
,{"availabilityZone":"us-east-1a","offeringType":"Heavy Utilization","instanceType":"m1.small","productDescription":"Linux/UNIX","duration":31536000,"currencyCode":"USD","fixedPrice":169.0,"hourlyPrice":0.014}
]}
Also see the companion AWS EC2 Price Comparison Chart is an example of what a client might do with the awsec2offering web service.