amazon-pricing 0.1.100 → 0.1.101
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/amazon-pricing/definitions/ec2-instance-type.rb +7 -1
- data/lib/amazon-pricing/definitions/instance-type.rb +13 -1
- data/lib/amazon-pricing/ec2-dhi-price-list.rb +1 -0
- data/lib/amazon-pricing/helpers/instance-type.rb +20 -4
- data/lib/amazon-pricing/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTU2NDFjMzQyMmJiYWM1ODQ4ZDUyMTY3ODg2MTJiZWNhNmI4ZmM3ZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OWNjODFmZGViN2Q5NjMwYjk3OGE3MWZmZDA4NDk3ZDJlZTJmODZjZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTc2ODc0OTgyY2UyYjlkYjg1OWYyNDZmOTZmYjRjMmEzOGQwOWVmNjRmYWU4
|
10
|
+
NWQ0M2U5NWY5NmZmZTRiNDY0ODYzMWE1OGVhMzJhMDdjY2U1YmY0ZGMwNGYx
|
11
|
+
Mjk1NmE5MGI3YTg4ODZlNjQ4N2FjZTI4ODgxZTVjMzI1NTdlOWU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MWFjZTE0ZTY4Mzk5NGY3YmY5MDJiODYwZDNjMjM2NjA0ODllZDA4YmZjZWVj
|
14
|
+
ZjY1N2EyOTRkN2MyY2NjNjhhZTQ5YTlmN2MzM2JkZDFmODE4Yjg0NGRiYWQ4
|
15
|
+
NjkzYzk5NjliZTBhOTI2NGFjNWY3YWI3YzE0MTEzYzgyOGQzNDE=
|
@@ -171,7 +171,7 @@ module AwsPricing
|
|
171
171
|
:high => 1000,
|
172
172
|
:ten_gigabit => 10000,
|
173
173
|
:twenty_gigabit => 20000,
|
174
|
-
:twentyfive_gigabit => 25000,
|
174
|
+
:twentyfive_gigabit => 25000, # presumes ENA
|
175
175
|
}
|
176
176
|
|
177
177
|
# handy summary here: www.ec2instances.info
|
@@ -188,6 +188,12 @@ module AwsPricing
|
|
188
188
|
'c4.8xlarge' => :ten_gigabit,
|
189
189
|
'c4.large' => :moderate,
|
190
190
|
'c4.xlarge' => :high,
|
191
|
+
'c5.18xlarge' => :twentyfive_gigabit,
|
192
|
+
'c5.2xlarge' => :ten_gigabit, # upto 10G
|
193
|
+
'c5.4xlarge' => :ten_gigabit, # upto 10G
|
194
|
+
'c5.9xlarge' => :ten_gigabit,
|
195
|
+
'c5.large' => :ten_gigabit, # upto 10G
|
196
|
+
'c5.xlarge' => :ten_gigabit, # upto 10G
|
191
197
|
'cache.c1.xlarge' => :high,
|
192
198
|
'cache.m1.large' => :moderate,
|
193
199
|
'cache.m1.medium' => :moderate,
|
@@ -206,7 +206,10 @@ module AwsPricing
|
|
206
206
|
'r4.8xlarge' => 'Memory Optimized Eight Extra Large Enterprise', 'r4.16xlarge' => 'Memory Optimized Hextuple Extra Large Enterprise',
|
207
207
|
't2.nano' => 'Burstable Performance Instance Nano', 't2.micro' => 'Burstable Performance Instance Micro', 't2.small' => 'Burstable Performance Instance Small', 't2.medium' => 'Burstable Performance Instance Medium', 't2.large' => 'Burstable Performance Instance Large',
|
208
208
|
't2.xlarge' => 'Burstable Performance Instance Extra Large', 't2.2xlarge' => 'Burstable Performance Instance Double Extra Large',
|
209
|
-
'c4.large' => 'Compute Optimized Large', 'c4.xlarge' => 'Compute Optimized Extra Large', 'c4.2xlarge' => 'Compute Optimized Double Extra Large', 'c4.4xlarge' => 'Compute Optimized Quadruple Extra Large',
|
209
|
+
'c4.large' => 'Compute Optimized Large', 'c4.xlarge' => 'Compute Optimized Extra Large', 'c4.2xlarge' => 'Compute Optimized Double Extra Large', 'c4.4xlarge' => 'Compute Optimized Quadruple Extra Large',
|
210
|
+
'c4.8xlarge' => 'Compute Optimized Eight Extra Large',
|
211
|
+
'c5.large' => 'Compute Optimized C5 Large', 'c5.xlarge' => 'Compute Optimized C5 Extra Large', 'c5.2xlarge' => 'Compute Optimized C5 Double Extra Large', 'c5.4xlarge' => 'Compute Optimized C5 Quadruple Extra Large',
|
212
|
+
'c5.9xlarge' => 'Compute Optimized C5 Nine Extra Large', 'c5.18xlarge' => 'Compute Optimized C5 Eighteen Extra Large',
|
210
213
|
'x1.16xlarge' => 'Memory Optimized Hextuple Large-scale Enterprise-class',
|
211
214
|
'x1.32xlarge' => 'Memory Optimized Large-scale Enterprise-class',
|
212
215
|
'x1e.32xlarge' => 'Memory Optimized Extended Large-scale Enterprise-class',
|
@@ -237,6 +240,7 @@ module AwsPricing
|
|
237
240
|
'r4.large' => 0, 'r4.xlarge' => 0, 'r4.2xlarge' => 0, 'r4.4xlarge' => 0, 'r4.8xlarge' => 0, 'r4.16xlarge' => 0,
|
238
241
|
't2.nano' => 0, 't2.micro' => 0, 't2.small' => 0, 't2.medium' => 0, 't2.large' => 0, 't2.xlarge' => 0, 't2.2xlarge' => 0,
|
239
242
|
'c4.large' => 0, 'c4.xlarge' => 0, 'c4.2xlarge' => 0, 'c4.4xlarge' => 0, 'c4.8xlarge' => 0,
|
243
|
+
'c5.large' => 0, 'c5.xlarge' => 0, 'c5.2xlarge' => 0, 'c5.4xlarge' => 0, 'c5.9xlarge' => 0, 'c5.18xlarge' => 0, # ebs-optimized
|
240
244
|
'x1.16xlarge' => 1920, 'x1.32xlarge' => 3840, 'x1e.32xlarge' => 3840,
|
241
245
|
'p2.xlarge' => 0, 'p2.8xlarge' => 0, 'p2.16xlarge' => 0, # ebs-optimized
|
242
246
|
'p3.2xlarge' => 0, 'p3.8xlarge' => 0, 'p3.16xlarge' => 0, # ebs-optimized
|
@@ -267,6 +271,7 @@ module AwsPricing
|
|
267
271
|
'r4.large' => 64, 'r4.xlarge' => 64, 'r4.2xlarge' => 64, 'r4.4xlarge' => 64, 'r4.8xlarge' => 64, 'r4.16xlarge' => 64,
|
268
272
|
't2.nano' => 64, 't2.micro' => 64, 't2.small' => 64, 't2.medium' => 64, 't2.large' => 64, 't2.xlarge' => 64, 't2.2xlarge' => 64,
|
269
273
|
'c4.large' => 64, 'c4.xlarge' => 64, 'c4.2xlarge' => 64, 'c4.4xlarge' => 64, 'c4.8xlarge' => 64,
|
274
|
+
'c5.large' => 64, 'c5.xlarge' => 64, 'c5.2xlarge' => 64, 'c5.4xlarge' => 64, 'c5.9xlarge' => 64, 'c5.18xlarge' => 64,
|
270
275
|
'x1.16xlarge' => 64, 'x1.32xlarge' => 64, 'x1e.32xlarge' => 64,
|
271
276
|
'p2.xlarge' => 64, 'p2.8xlarge' => 64, 'p2.16xlarge' => 64,
|
272
277
|
'p3.2xlarge' => 64, 'p3.8xlarge' => 64, 'p3.16xlarge' => 64,
|
@@ -297,6 +302,7 @@ module AwsPricing
|
|
297
302
|
'r4.large' => :ebs, 'r4.xlarge' => :ebs, 'r4.2xlarge' => :ebs, 'r4.4xlarge' => :ebs, 'r4.8xlarge' => :ebs, 'r4.16xlarge' => :ebs,
|
298
303
|
't2.nano' => :ebs, 't2.micro' => :ebs, 't2.small' => :ebs, 't2.medium' => :ebs, 't2.large' => :ebs, 't2.xlarge' => :ebs, 't2.2xlarge' => :ebs,
|
299
304
|
'c4.large' => :ebs, 'c4.xlarge' => :ebs, 'c4.2xlarge' => :ebs, 'c4.4xlarge' => :ebs, 'c4.8xlarge' => :ebs,
|
305
|
+
'c5.large' => :ebs, 'c5.xlarge' => :ebs, 'c5.2xlarge' => :ebs, 'c5.4xlarge' => :ebs, 'c5.9xlarge' => :ebs, 'c5.18xlarge' => :ebs,
|
300
306
|
'x1.16xlarge' => :ssd, 'x1.32xlarge' => :ssd, 'x1e.32xlarge' => :ssd,
|
301
307
|
'p2.xlarge' => :ebs, 'p2.8xlarge' => :ebs, 'p2.16xlarge' => :ebs,
|
302
308
|
'p3.2xlarge' => :ebs, 'p3.8xlarge' => :ebs, 'p3.16xlarge' => :ebs,
|
@@ -344,6 +350,12 @@ module AwsPricing
|
|
344
350
|
# c4.8xlarge is EBS-only
|
345
351
|
# c4.large is EBS-only
|
346
352
|
# c4.xlarge is EBS-only
|
353
|
+
# c5.18xlarge is EBS-only 9 Gbps
|
354
|
+
# c5.2xlarge is EBS-only Up to 2.25 Gbps
|
355
|
+
# c5.4xlarge is EBS-only 2.25 Gbps
|
356
|
+
# c5.9xlarge is EBS-only 4.5 Gbps
|
357
|
+
# c5.large is EBS-only Up to 2.25 Gbps
|
358
|
+
# c5.xlarge is EBS-only Up to 2.25 Gbps
|
347
359
|
# cache.c1.xlarge is not picked up by CloudWatch
|
348
360
|
# cache.m1.large is not picked up by CloudWatch
|
349
361
|
# cache.m1.medium is not picked up by CloudWatch
|
@@ -60,6 +60,7 @@ module AwsPricing
|
|
60
60
|
# hack for now until I can get capacity for fpga instances
|
61
61
|
next if family == 'f1'
|
62
62
|
if @@CAPACITY_HASH[family].nil?
|
63
|
+
# 2017-11-08 family == 'c5' not supported for DH
|
63
64
|
$stderr.puts "[fetch_ec2_dedicated_host_instance_pricing] WARNING: unable to find CAPACITY_HASH for #{family}"
|
64
65
|
next
|
65
66
|
end
|
@@ -20,7 +20,8 @@ module AwsPricing
|
|
20
20
|
'ComputeOptimized' => {
|
21
21
|
'CurrentGen' => {
|
22
22
|
'C3' => ['c3.large', 'c3.xlarge', 'c3.2xlarge', 'c3.4xlarge', 'c3.8xlarge'],
|
23
|
-
'C4' => ['c4.large', 'c4.xlarge', 'c4.2xlarge', 'c4.4xlarge', 'c4.8xlarge']
|
23
|
+
'C4' => ['c4.large', 'c4.xlarge', 'c4.2xlarge', 'c4.4xlarge', 'c4.8xlarge'],
|
24
|
+
'C5' => ['c5.large', 'c5.xlarge', 'c5.2xlarge', 'c5.4xlarge', 'c5.9xlarge', 'c5.18xlarge'],
|
24
25
|
},
|
25
26
|
'PreviousGen' => {
|
26
27
|
'C1' => ['c1.medium', 'c1.xlarge', 'cc1.4xlarge'],
|
@@ -154,10 +155,23 @@ module AwsPricing
|
|
154
155
|
size_to_nf[name.split('.').last]
|
155
156
|
end
|
156
157
|
|
158
|
+
# note: the next smaller type may _not_ be supported for a given family
|
159
|
+
# so this returns the next logical/possible smaller type, but not necessarily
|
160
|
+
# the next valid type
|
157
161
|
def next_smaller_type(name)
|
158
162
|
fam,type = name.split('.')
|
159
|
-
|
160
|
-
|
163
|
+
orig_nf = size_to_nf[type]
|
164
|
+
return nil unless orig_nf
|
165
|
+
# paranoia: assumes size_to_nf may not be sorted, which we need to step down
|
166
|
+
sorted_size_to_nf = {}
|
167
|
+
size_to_nf.sort_by(&:last).each do |(size,nf)|
|
168
|
+
sorted_size_to_nf[size] = nf
|
169
|
+
end
|
170
|
+
size_keys = sorted_size_to_nf.keys
|
171
|
+
idx = size_keys.index(type)
|
172
|
+
idx = idx -1 if (idx > 0) # don't go smaller, than smallest
|
173
|
+
nf = sorted_size_to_nf[new_type = size_keys.at(idx)]
|
174
|
+
|
161
175
|
["#{fam}.#{new_type}" , nf]
|
162
176
|
end
|
163
177
|
|
@@ -179,9 +193,11 @@ module AwsPricing
|
|
179
193
|
"2xlarge" => 16,
|
180
194
|
"4xlarge" => 32,
|
181
195
|
"8xlarge" => 64,
|
196
|
+
"9xlarge" => 72,
|
182
197
|
"10xlarge" => 80,
|
183
198
|
"16xlarge" => 128,
|
184
|
-
"
|
199
|
+
"18xlarge" => 144,
|
200
|
+
"32xlarge" => 256,
|
185
201
|
}
|
186
202
|
NF_TO_SIZE_TABLE = SIZE_TO_NF_TABLE.invert
|
187
203
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amazon-pricing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.101
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Kinsella
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Ruby library for retrieving pricing for Amazon Web Services
|
14
14
|
email:
|