Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions contrib/scrape-ec2-prices.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

LINUX_PRICING_URLS = [
# Deprecated instances (JSON format)
'http://aws.amazon.com/ec2/pricing/json/linux-od.json',
'https://aws.amazon.com/ec2/pricing/json/linux-od.json',
# Previous generation instances (JavaScript file)
'http://a0.awsstatic.com/pricing/1/ec2/previous-generation/linux-od.min.js',
'https://a0.awsstatic.com/pricing/1/ec2/previous-generation/linux-od.min.js',
# New generation instances (JavaScript file)
'https://a0.awsstatic.com/pricing/1/ec2/linux-od.min.js'
]
Expand All @@ -40,6 +40,7 @@
'us-west-1',
'us-west-2',
'eu-west-1',
'eu-central-1',
'ap-southeast-1',
'ap-southeast-2',
'ap-northeast-1',
Expand Down Expand Up @@ -68,6 +69,10 @@
'c3.2xlarge',
'c3.4xlarge',
'c3.8xlarge',
'd2.xlarge',
'd2.2xlarge',
'd2.4xlarge',
'd2.8xlarge',
'cg1.4xlarge',
'g2.2xlarge',
'cr1.8xlarge',
Expand All @@ -90,13 +95,21 @@
# Maps EC2 region name to region name used in the pricing file
REGION_NAME_MAP = {
'us-east': 'ec2_us_east',
'us-east-1': 'ec2_us_east',
'us-west': 'ec2_us_west',
'us-west-1': 'ec2_us_west',
'us-west-2': 'ec2_us_west_oregon',
'eu-west-1': 'ec2_eu_west',
'eu-ireland': 'ec2_eu_west',
'eu-central-1': 'ec2_eu_central',
'apac-sin': 'ec2_ap_southeast',
'ap-southeast-1': 'ec2_ap_southeast',
'apac-syd': 'ec2_ap_southeast_2',
'ap-southeast-2': 'ec2_ap_southeast_2',
'apac-tokyo': 'ec2_ap_northeast',
'ap-northeast-1': 'ec2_ap_northeast',
'sa-east-1': 'ec2_sa_east',
'us-gov-west-1': 'ec2_us_govwest'
}

BASE_PATH = os.path.dirname(os.path.abspath(__file__))
Expand Down
56 changes: 56 additions & 0 deletions libcloud/compute/drivers/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,34 @@
'disk': 6400,
'bandwidth': None
},
'd2.xlarge': {
'id': 'd2.xlarge',
'name': 'High Storage Optimized Extra Large Instance',
'ram': 30050,
'disk': 6000, # 3 x 2 TB
'bandwidth': None
},
'd2.2xlarge': {
'id': 'd2.2xlarge',
'name': 'High Storage Optimized Double Extra Large Instance',
'ram': 61952,
'disk': 12000, # 6 x 2 TB
'bandwidth': None
},
'd2.4xlarge': {
'id': 'd2.4xlarge',
'name': 'High Storage Optimized Quadruple Extra Large Instance',
'ram': 122000,
'disk': 24000, # 12 x 2 TB
'bandwidth': None
},
'd2.8xlarge': {
'id': 'd2.8xlarge',
'name': 'High Storage Optimized Eight Extra Large Instance',
'ram': 244000,
'disk': 48000, # 24 x 2 TB
'bandwidth': None
},
# 1x SSD
'r3.large': {
'id': 'r3.large',
Expand Down Expand Up @@ -408,6 +436,10 @@
'i2.2xlarge',
'i2.4xlarge',
'i2.8xlarge',
'd2.xlarge',
'd2.2xlarge',
'd2.4xlarge',
'd2.8xlarge',
'r3.large',
'r3.xlarge',
'r3.2xlarge',
Expand Down Expand Up @@ -492,6 +524,10 @@
'i2.2xlarge',
'i2.4xlarge',
'i2.8xlarge',
'd2.xlarge',
'd2.2xlarge',
'd2.4xlarge',
'd2.8xlarge',
'r3.large',
'r3.xlarge',
'r3.2xlarge',
Expand Down Expand Up @@ -535,6 +571,10 @@
'i2.2xlarge',
'i2.4xlarge',
'i2.8xlarge',
'd2.xlarge',
'd2.2xlarge',
'd2.4xlarge',
'd2.8xlarge',
'r3.large',
'r3.xlarge',
'r3.2xlarge',
Expand Down Expand Up @@ -565,6 +605,10 @@
'i2.2xlarge',
'i2.4xlarge',
'i2.8xlarge',
'd2.xlarge',
'd2.2xlarge',
'd2.4xlarge',
'd2.8xlarge',
'r3.large',
'r3.xlarge',
'r3.2xlarge',
Expand Down Expand Up @@ -606,6 +650,10 @@
'i2.2xlarge',
'i2.4xlarge',
'i2.8xlarge',
'd2.xlarge',
'd2.2xlarge',
'd2.4xlarge',
'd2.8xlarge',
't2.micro',
't2.small',
't2.medium'
Expand Down Expand Up @@ -643,6 +691,10 @@
'i2.2xlarge',
'i2.4xlarge',
'i2.8xlarge',
'd2.xlarge',
'd2.2xlarge',
'd2.4xlarge',
'd2.8xlarge',
'r3.large',
'r3.xlarge',
'r3.2xlarge',
Expand Down Expand Up @@ -710,6 +762,10 @@
'i2.2xlarge',
'i2.4xlarge',
'i2.8xlarge',
'd2.xlarge',
'd2.2xlarge',
'd2.4xlarge',
'd2.8xlarge',
'r3.large',
'r3.xlarge',
'r3.2xlarge',
Expand Down
136 changes: 135 additions & 1 deletion libcloud/data/pricing.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,17 @@
"c3.8xlarge": "2.043",
"c3.large": "0.128",
"c3.xlarge": "0.255",
"c4.2xlarge": "0.588",
"c4.4xlarge": "1.176",
"c4.8xlarge": "2.352",
"c4.large": "0.147",
"c4.xlarge": "0.294",
"cc2.8xlarge": "2.349",
"cr1.8xlarge": "4.105",
"d2.2xlarge": "1.688",
"d2.4xlarge": "3.376",
"d2.8xlarge": "6.752",
"d2.xlarge": "0.844",
"g2.2xlarge": "0.898",
"hi1.4xlarge": "3.276",
"hs1.8xlarge": "5.400",
Expand Down Expand Up @@ -81,7 +90,17 @@
"c3.8xlarge": "2.117",
"c3.large": "0.132",
"c3.xlarge": "0.265",
"c4.2xlarge": "0.608",
"c4.4xlarge": "1.216",
"c4.8xlarge": "2.432",
"c4.large": "0.152",
"c4.xlarge": "0.304",
"d2.2xlarge": "1.740",
"d2.4xlarge": "3.480",
"d2.8xlarge": "6.960",
"d2.xlarge": "0.870",
"g2.2xlarge": "1.000",
"hi1.4xlarge": "N/A",
"hs1.8xlarge": "5.570",
"i2.2xlarge": "2.035",
"i2.4xlarge": "4.070",
Expand Down Expand Up @@ -116,7 +135,17 @@
"c3.8xlarge": "2.117",
"c3.large": "0.132",
"c3.xlarge": "0.265",
"c4.2xlarge": "0.608",
"c4.4xlarge": "1.216",
"c4.8xlarge": "2.432",
"c4.large": "0.152",
"c4.xlarge": "0.304",
"d2.2xlarge": "1.740",
"d2.4xlarge": "3.480",
"d2.8xlarge": "6.960",
"d2.xlarge": "0.870",
"g2.2xlarge": "0.898",
"hi1.4xlarge": "N/A",
"hs1.8xlarge": "5.570",
"i2.2xlarge": "2.035",
"i2.4xlarge": "4.070",
Expand All @@ -143,6 +172,39 @@
"t2.micro": "0.020",
"t2.small": "0.040"
},
"ec2_eu_central": {
"c3.2xlarge": "0.516",
"c3.4xlarge": "1.032",
"c3.8xlarge": "2.064",
"c3.large": "0.129",
"c3.xlarge": "0.258",
"c4.2xlarge": "0.592",
"c4.4xlarge": "1.184",
"c4.8xlarge": "2.368",
"c4.large": "0.148",
"c4.xlarge": "0.296",
"d2.2xlarge": "1.588",
"d2.4xlarge": "3.176",
"d2.8xlarge": "6.352",
"d2.xlarge": "0.794",
"g2.2xlarge": null,
"i2.2xlarge": "2.026",
"i2.4xlarge": "4.051",
"i2.8xlarge": "8.102",
"i2.xlarge": "1.013",
"m3.2xlarge": "0.665",
"m3.large": "0.166",
"m3.medium": "0.083",
"m3.xlarge": "0.332",
"r3.2xlarge": "0.842",
"r3.4xlarge": "1.684",
"r3.8xlarge": "3.369",
"r3.large": "0.210",
"r3.xlarge": "0.421",
"t2.medium": "0.060",
"t2.micro": "0.015",
"t2.small": "0.030"
},
"ec2_eu_west": {
"c1.medium": "0.148",
"c1.xlarge": "0.592",
Expand All @@ -151,9 +213,18 @@
"c3.8xlarge": "1.912",
"c3.large": "0.120",
"c3.xlarge": "0.239",
"c4.2xlarge": "0.528",
"c4.4xlarge": "1.056",
"c4.8xlarge": "2.112",
"c4.large": "0.132",
"c4.xlarge": "0.264",
"cc2.8xlarge": "2.250",
"cg1.4xlarge": "2.360",
"cr1.8xlarge": "3.750",
"d2.2xlarge": "1.470",
"d2.4xlarge": "2.940",
"d2.8xlarge": "5.880",
"d2.xlarge": "0.735",
"g2.2xlarge": "0.702",
"hi1.4xlarge": "3.100",
"hs1.8xlarge": "4.900",
Expand Down Expand Up @@ -190,6 +261,8 @@
"c3.8xlarge": "2.600",
"c3.large": "0.163",
"c3.xlarge": "0.325",
"hi1.4xlarge": "N/A",
"hs1.8xlarge": "N/A",
"m1.large": "0.233",
"m1.medium": "0.117",
"m1.small": "0.058",
Expand All @@ -214,9 +287,18 @@
"c3.8xlarge": "1.680",
"c3.large": "0.105",
"c3.xlarge": "0.210",
"c4.2xlarge": "0.464",
"c4.4xlarge": "0.928",
"c4.8xlarge": "1.856",
"c4.large": "0.116",
"c4.xlarge": "0.232",
"cc2.8xlarge": "2.000",
"cg1.4xlarge": "2.100",
"cr1.8xlarge": "3.500",
"d2.2xlarge": "1.380",
"d2.4xlarge": "2.760",
"d2.8xlarge": "5.520",
"d2.xlarge": "0.690",
"g2.2xlarge": "0.650",
"hi1.4xlarge": "3.100",
"hs1.8xlarge": "4.600",
Expand Down Expand Up @@ -245,6 +327,42 @@
"t2.micro": "0.013",
"t2.small": "0.026"
},
"ec2_us_govwest": {
"c1.medium": "0.157",
"c1.xlarge": "0.628",
"c3.2xlarge": "0.504",
"c3.4xlarge": "1.008",
"c3.8xlarge": "2.016",
"c3.large": "0.126",
"c3.xlarge": "0.252",
"cc2.8xlarge": "2.250",
"hi1.4xlarge": "N/A",
"hs1.8xlarge": "5.520",
"i2.2xlarge": "2.046",
"i2.4xlarge": "4.092",
"i2.8xlarge": "8.184",
"i2.xlarge": "1.023",
"m1.large": "0.211",
"m1.medium": "0.106",
"m1.small": "0.053",
"m1.xlarge": "0.423",
"m2.2xlarge": "0.586",
"m2.4xlarge": "1.171",
"m2.xlarge": "0.293",
"m3.2xlarge": "0.672",
"m3.large": "0.168",
"m3.medium": "0.084",
"m3.xlarge": "0.336",
"r3.2xlarge": "0.840",
"r3.4xlarge": "1.680",
"r3.8xlarge": "3.360",
"r3.large": "0.210",
"r3.xlarge": "0.420",
"t1.micro": "0.024",
"t2.medium": "0.062",
"t2.micro": "0.015",
"t2.small": "0.031"
},
"ec2_us_west": {
"c1.medium": "0.148",
"c1.xlarge": "0.592",
Expand All @@ -253,7 +371,14 @@
"c3.8xlarge": "1.912",
"c3.large": "0.120",
"c3.xlarge": "0.239",
"c4.2xlarge": "0.552",
"c4.4xlarge": "1.104",
"c4.8xlarge": "2.208",
"c4.large": "0.138",
"c4.xlarge": "0.276",
"g2.2xlarge": "0.702",
"hi1.4xlarge": "N/A",
"hs1.8xlarge": "N/A",
"i2.2xlarge": "1.876",
"i2.4xlarge": "3.751",
"i2.8xlarge": "7.502",
Expand Down Expand Up @@ -287,8 +412,17 @@
"c3.8xlarge": "1.680",
"c3.large": "0.105",
"c3.xlarge": "0.210",
"c4.2xlarge": "0.464",
"c4.4xlarge": "0.928",
"c4.8xlarge": "1.856",
"c4.large": "0.116",
"c4.xlarge": "0.232",
"cc2.8xlarge": "2.000",
"cr1.8xlarge": "3.500",
"d2.2xlarge": "1.380",
"d2.4xlarge": "2.760",
"d2.8xlarge": "5.520",
"d2.xlarge": "0.690",
"g2.2xlarge": "0.650",
"hi1.4xlarge": "3.100",
"hs1.8xlarge": "4.600",
Expand Down Expand Up @@ -587,5 +721,5 @@
}
},
"storage": {},
"updated": 1410030750
"updated": 1427829652
}
Loading