简体   繁体   English

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

[英]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.

相关问题 AWS 实例队列中的投标价格 - Bid Price in AWS Instance Fleets 为什么我的 Tkinter 在从 web 抓取并显示价格时冻结? - Why my Tkinter freezes while grabing and showing price from web? 更改AWS Spot实例的最高出价 - Changing max bid price of AWS Spot instance 创建列表的副本,以使列表的每个元素都与原始元素不同? - Create a copy of a list such that each element of the list is different from the original? 为什么Google DNS云对gcloud DNS记录列表和来自API的列表显示不同的结果? - Why google dns cloud is showing different results for gcloud dns records list and list from api? type(instance) 何时与 instance.__class__ 不同? - When is type(instance) different from instance.__class__? 为什么从原始列表中弹出会使 reversed(original_list) 为空? - Why does popping from the original list make reversed(original_list) empty? 类中的函数在直接调用时有效,但从具有原始实例的不同类调用时返回错误 - Function from class works when called directly, but returns error when called from a different class with an instance of original AWS boto3:如何获取特定实例 ID 的每小时价格 - AWS boto3: how to get hourly price of a specific instance id 为什么此代码返回原始列表? - Why is this code returning the original list?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM