问题描述
简单的问题:
如果我有六个相同的 EC2 实例处理数据正好十分钟然后关闭,我会被收取六小时还是一小时的费用?
If I had six identical EC2 instances process data for exactly ten minutes and turn off would I be charged six hours or one hour?
推荐答案
更新: EC2 和 EBS 现在基于使用情况 精确到秒
Update: EC2 and EBS are now based on usage down to the second
旧答案更改的粒度精确到小时.
Old answerGranularity for changes are measure down to the hour.
来自 AWS 定价站点 http://aws.amazon.com/ec2/pricing/:
From the AWS pricing site http://aws.amazon.com/ec2/pricing/:
定价是每个实例消耗的实例小时,从时间开始启动一个实例,直到它被终止或停止.每个消耗的部分实例小时将按完整小时计费.
除非您计算的时间低于免费套餐的阈值,否则您第二次使用 EC2 实例需要支付一小时的费用.如果您在第一个小时内多走了一秒钟,您将收取整整第二个小时的费用.
Unless you are calculating time to be under a threshold for a free tier, the second you use an EC2 instance you're charged for the full hour. If you go one second over the first hour, your charged for a full second hour.
一个警告:Spot 实例.
One caveat: Spot Instances.
如果 Spot 实例在使用一小时之前被 AWS(而不是您)中断,则您无需支付任何费用.如果您中断 Spot 实例,您需要支付部分小时的使用费(即根据按需实例四舍五入的完整小时).
If spot instances are interrupted by AWS (not you) before reaching a full hour use, you're not charged at all. If you interrupt the spot instance, you're charge for the partial hour usage (which is a full hour rounded up as per the on-demand instances).
这篇关于AWS EC2 究竟如何计算每小时成本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!