AWS EC2 现货实例计费

AWS EC2 spot instance billing

我使用自动出价创建了一个 EC2 现货实例,几分钟内创建了一个 EC2 实例,几分钟后我终止了它。

我如何知道 运行 的 Spot 实例需要支付多少费用?我浏览了 'Instances' 和 'Spot Requests' 选项卡寻找相同的内容,但无法找到相同的内容。

您始终支付当前现货价格。如果您出价 0.20 美元,而当前现货价格为 0.15 美元,那么您将为此一小时支付 0.15 美元。下一个小时一开始,您就付款,无论当时的新现货价格是多少,您的第二个小时开始。

即使您在一小时结束前关闭了实例,您始终需要支付整整一小时的费用。唯一的例外是当您的现货实例因为现货价格超过您的出价而终止时。然后最后一小时不收费。示例:如果在第二个小时开始后 15 分钟现货价格超过您的出价,则您只需支付第一个小时的费用。如果在第二个小时开始后 59 分钟现货价格超过您的出价,那么您仍然只需支付第一个小时的费用。

另请参阅此页面: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html

您想使用 Spot Instance Data Feed:

To help you understand the charges for your Spot Instances, Amazon EC2 provides a data feed that describes your Spot Instance usage and pricing. This data feed is sent to an Amazon S3 bucket that you specify when you subscribe to the data feed.

Data feed files arrive in your bucket typically once an hour, and each hour of usage is typically covered in a single data file. These files are compressed (gzip) before they are delivered to your bucket. Amazon EC2 can write multiple files for a given hour of usage where files are very large (for example, when file contents for the hour exceed 50 MB before compression).

顺便说一下,对于新的 per-second billing for EC2 instancesLinux spot 实例也将按秒计费。