繁体   English   中英

为什么实例类型的价格显示与原始AWS列表不同?

[英]Why price of an instance type showing different from original AWS list?

我在python中使用boto ec2查询AWS定价。 首先,我使用get_all_reserved_instances_offerings查找所有具有特定实例类型的提供实例,然后对于所有按上述价格返回的实例,我将检查“小时频率”中的金额和固定价格。 我通过以下代码执行此操作:

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正确地each_ins.fixed_price打印

"d2.2xlarge": 3844.0,

"m3.2xlarge": 1961.0,

它显示正确的价格,如带有红色标记的图片所示:

在此处输入图片说明

但是ins.amount打印:

"d2.2xlarge": 0.438,

"m3.2xlarge": 0.248, 

我认为应该是上图中带有绿色标记的0.8768

绿色框中的值是一年中每小时实例的总体有效成本(即,占一年中每小时的费用加上一年中初始的前期成本)。

但是, ins.amount值是每月每小时收取的费用,而忽略了初始的前期费用。 从每月费用中大致算出一个月的时间,得出的每小时费用约为0.444 ,几乎与您看到的值相对应。

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM