What is the maximum bid price for an AWS EC2 spot instance of a given instance type (Eg:m2.xlarge, m3.medium etc) ? Where can I find that out?
In case this is why you are asking - there is no bid amount that you can enter that will guarantee your spot instance will remain running - even if you are the highest bidder.
EDIT: Thru trial a bit of trial an error after #Michaels comment below, I have determined that there is indeed a limit. I tried to launch 1/2 dozen instances of various sizes and bid $100/hr for each. At each failed attempt I was told that the maximum price was exceeded and was quoted a max price that was 10X the ondemand price. So if the instance on-demand price was 0.14, I was given the error that my bid exceed the max of $1.40.
I also could not find documentation of this anywhere, but a bit of trial and error seemed pretty indicative that 10x is the limit.
The maximum price you can bid is 10 times the on-demand instance price of that type.
The AWS documentation has a section about Spot bid limit. Currently, it is capped to 10 times the On-Demand price:
The bid price limit for Spot instances is ten times the On-Demand price. This limit is designed to help you control costs.
Related
AWS is sending an invoice at the end of each month with the price of the EC2 instance and the number of used hours. Since the price fluctuates, which price is taken to compute the bill? The price at the end of the month, at the beginning of the month or the real price for each used hour?
Thanks
If you are using on-demand EC2 instances, the prices don't fluctuate. When AWS does reduce prices, the new pricing takes effect on a specific date and your bill should reflect the reduced prices as of that date.
There are some complexities in billing when you have credits or Reserved Instances, especially when you use multiple accounts with Organizations or Consolidated billing.
There are some products that have thresholds - for example, S3 standard storage gets cheaper the more you use - the first 50TB are $0.023/GB, the next 450 TB are $0.022/GB, etc.
So I'm receiving this alert at the end of every month for the past year.
And rightly so in my cost & Bills Dashboard there it is:
But each month I go in RDS Dashboard and it is empty, I checked every tab and didn't found anything.
Could that be a glitch ?
Thanks a lot
This is because AWS count this if how long your AWS instance is running other than other factors.
For RDS the maximum amount of time an instance can run is 750 hours which usually cover a complete month of 31 days.
Normally you use *30 = 720 (744 in the case of 31 days) hours so AWS wore you if your free tier is about to exceed.
if you calculate then it would be about the % showing by the console.
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.
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.
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.
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
I would like to create an auto scaling group [ASG] with spot instances as a supplement to my production ASG that has on-demand instances.
After reading this post , I would like to mimic it but maybe without the dynamic bidding and auto-scaling at first.
So, I was wondering , if I just set the bid price for the spot instances equal to the on-demand price of the instance I use [m3.large] , would I be paying the lowest bid price [for that instance, in the region, in that hour] ??
So if the spot price is $0.01 and my max bid in the ASG is $0.067 , I would be paying $0.01 for every spot instance the ASG launches, right??
[That is what I understood from the AWS docs but I would like a confirmation]
And finally, by this kind of thinking [that I suppose I am not the only one to have] do I drive the spot instance prices up ?
Spot instance prices are different among Availability Zones. You pay based on the market price (M) where your instances are in.
You set a bid price (B). The payment rule is:
If the market price is lower than or equal your bid (M <= B) and there are free resources on spot-instances pool, you pay the market price.
If the market price is higher than your bid (M > B, outbid) or there are no free resources on spot-instances pool, your spot-instances will be terminated and no need to pay the current partial hour. You only need to pay the full hours that you used.
If you run spot-instances less than an hour and you terminate it by yourself, you need to pay for that partial hour.
Your bid is only the maximum amount that you want to pay for the spot-instances.
For more detail, you can see the official documentation. The market prices are driven by availability free resources and market demand.
For a bidding strategy, you can consult Spot Bid Advisor. In that page, you can find which instance types has lower outbid frequency based on the bid.
Added as per #Michael's suggestion on comment below:
The current market price is the lowest bid among all currently running instances. As an illustration, let say there were 3 instances were available (maybe more in the real case), and there were 4 bids for $1, $2, $3, and $5, the three highest bidders would have running instances, and the market price would be $2. So, your bid price may drive the spot instance indirectly if you are a winning bidder and there are more open bids than available spot instances.
I have a small question on the spot pricing. Let us assume I have placed a max bid of $0.15 for a c3.large spot EC2 instance. And the current price at that time time was $0.08per hour.
Eventually in the next hour the spot price dropped to $0.03 per hour. Now my question is at what price will I be charged?
$0.08 for the first hour and $0.03 for the second hour?
$0.08 for my entire usage?
Per the documentation for Spot Instances:
Spot instance-hours are billed based on the Spot price at the start of
each instance-hour. If your Spot Instance is interrupted in the middle
of an instance-hour (because the Spot price exceeded your max bid
price), you are not billed for that partial hour of Spot use.
(However, if you terminate the Spot instance, you are charged for the
partial hour of use.)
The important part there is that spot instance-hours are billed based on the Spot price at the start of each instance-hour.
So if the price dropped to $0.03 during the second hour, but not at the time that the second instance-hour began, then you would be charged $0.08 for the second hour. You would be charged $0.03 for the third hour, assuming the price does not change again.