Praveen Sripati
Praveen Sripati

Reputation: 33545

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.

enter image description here

How do I know how much I would be billed for the spot instance I ran? I browsed the 'Instances' and the 'Spot Requests' tab for the same, but could not get the same.

Upvotes: 1

Views: 837

Answers (2)

John Rotenstein
John Rotenstein

Reputation: 270144

You want to use the 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).

By the way, with the new per-second billing for EC2 instances, Linux spot instances will also be billed per-second.

Upvotes: 2

Marcus
Marcus

Reputation: 450

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. 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. If the spot price exceeds your bid 59 minutes after the second hour has begun, than you still only pay the first hour.

Also refer to this page: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-instances.html

Upvotes: 1

Related Questions