Search code examples
amazon-ec2aws-databricksspot-instances

Configure Amazon maximum percentage of OnDemand price (spot instances)


I'm playing a little with spot instances, and for example, in Databricks, I can ask for a spot instance with a minimum of % savings over On-Demand instances. My question is, if I set 90% off the On-Demand instance and the current price is 50%, I will get the cheaper instance or is it like bidding and I get the spot for 90% price? I have some use cases when the availability of one instance is not very important so will be good to get those at any discount. Summing up, if I set a minimum of 90% I will always get the cheaper spot available? Thanks!


Solution

  • As per the this article from databricks:

    Databricks defaults to a bid price that is equal to the current on-demand price. So if the on-demand price for your instance type is $0.665 cents per hour, then the default bid price is also set to $0.665 cents per hour. Recall that with Spot instances, you don’t necessarily pay your actual bid price - you pay the Spot market price for your instance type. So, even though you may have bid $0.665 cents, in reality you may only be charged $0.10 for the hour.

    So its safe to assume that you will be charged whats the current spot market price but not more then what you set.