[英]Why price of an instance type showing different from original AWS list?
I am query AWS pricing using boto ec2 in python. 我在python中使用boto ec2查询AWS定价。 Firstly,I am finding all offering instances of particular instance type using get_all_reserved_instances_offerings , then for all instances return by above, I am checking amount and fixed price in 'hourly frequency'. 首先,我使用get_all_reserved_instances_offerings查找所有具有特定实例类型的提供实例,然后对于所有按上述价格返回的实例,我将检查“小时频率”中的金额和固定价格。 I do this by this code: 我通过以下代码执行此操作:
for ins in each_ins.recurring_charges:
if ins.frequency == 'Hourly':
print float(ins.amount)
print float(each_ins.fixed_price)
each_ins.fixed_price
prints upfront correctly each_ins.fixed_price
正确地each_ins.fixed_price
打印
"d2.2xlarge": 3844.0,
"m3.2xlarge": 1961.0,
it shows correct price as shown in picture with red mark: 它显示正确的价格,如带有红色标记的图片所示:
But ins.amount prints: 但是ins.amount打印:
"d2.2xlarge": 0.438,
"m3.2xlarge": 0.248,
I think it should be 0.8768
as shown in above picture with green mark. 我认为应该是上图中带有绿色标记的0.8768
。
The values in the green box are the overall effective cost of the instances per hour over the year (ie accounting for the per hour charge over the year plus the initial up-front cost spread over the year.) 绿色框中的值是一年中每小时实例的总体有效成本(即,占一年中每小时的费用加上一年中初始的前期成本)。
However the ins.amount
value is the cost charged per hour each month, ignoring the initial up-front cost. 但是, ins.amount
值是每月每小时收取的费用,而忽略了初始的前期费用。 Roughly calculating over a month from the monthly cost gives an hourly cost of ~ 0.444
, pretty much corresponding to the values you're seeing. 从每月费用中大致算出一个月的时间,得出的每小时费用约为0.444
,几乎与您看到的值相对应。
AWS says the following with respect to the continuing monthly charges: AWS对于持续的每月费用说以下几点:
*This is the average monthly payment over the course of the RI term. For each month, the actual monthly payment will equal the actual number of hours in that month multiplied by the hourly usage rate. The hourly usage rate is equivalent to the total average monthly payments over the term of the RI divided by the total number of hours (based on a 365 day year) over the term of the RI.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.