简体   繁体   English

AWS EC2 Spot 实例计费

[英]AWS EC2 spot instance billing

I have created an EC2 spot instance, using automated bidding and an EC2 instance was created within a few minutes and I terminated the same after a few minutes.我使用自动出价创建了一个 EC2 现货实例,并在几分钟内创建了一个 EC2 实例,几分钟后我将其终止。

在此处输入图片说明

How do I know how much I would be billed for the spot instance I ran?我如何知道我会为我运行的 Spot 实例支付多少费用? I browsed the 'Instances' and the 'Spot Requests' tab for the same, but could not get the same.我浏览了“实例”和“Spot 请求”选项卡,但无法获得相同的结果。

You want to use the Spot Instance Data Feed :您要使用Spot 实例数据馈送

To help you understand the charges for your Spot Instances, Amazon EC2 provides a data feed that describes your Spot Instance usage and pricing .为帮助您了解 Spot 实例的费用,Amazon EC2 提供了描述您的 Spot 实例使用情况和定价的数据馈送。 This data feed is sent to an Amazon S3 bucket that you specify when you subscribe to the data feed.此数据馈送将发送到您在订阅数据馈送时指定的 Amazon S3 存储桶。

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.这些文件在传送到您的存储桶之前会被压缩 (gzip)。 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). Amazon EC2 可以在文件非常大的给定使用小时内写入多个文件(例如,当压缩前一小时的文件内容超过 50 MB 时)。

By the way, with the new per-second billing for EC2 instances , Linux spot instances will also be billed per-second.顺便说一下,随着EC2 实例新的按秒计费Linux Spot 实例也将按秒计费

You always pay the current spot price.您始终支付当前现货价格。 If you bid 0.20$ and the current spot price is 0.15$ then you pay 0.15$ for that one hour.如果您出价 0.20 美元且当前现货价格为 0.15 美元,那么您为该一小时支付 0.15 美元。 As soon as the next hours starts, you pay, whathever the new spot price is at that moment your second hours starts.下一小时一开始,您就付款,无论您的第二小时开始时新的现货价格是多少。

You always pay the full hour even though you shut down your instance before the end of that one hour.即使您在一小时结束前关闭了实例,您也始终支付整整一小时的费用。 The only exception from that, is when your spot instance gets terminated because the spot price exceed your bid price.唯一的例外是当您的现货实例因现货价格超过您的出价而被终止时。 Then the last hour is not charged.然后最后一小时不收费。 Example: If the spot price exceeds your bid 15 minutes after the second hour has begun, than you only have to pay the first hour.示例:如果现货价格在第二个小时开始后 15 分钟超过您的出价,那么您只需支付第一个小时的费用。 If the spot price exceeds your bid 59 minutes after the second hour has begun, than you still only pay the first hour.如果现货价格在第二个小时开始后 59 分钟超过您的出价,那么您仍然只需支付第一个小时的费用。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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