I'm evaluating Amazon EC2 spot instances, which seem like they will provide a good value for some of our computationally intensive but not time sensitive processes. The concept is simple enough, our instance will run for as long as desired assuming our maximum bid exceeds the current market price. I know that the instances can be terminated abruptly if the market price ever exceeds our maximum bid. I also know that Amazon only bills in even hours for instance run time and charges for a full hour the moment your instance transitions to the running state. So here's the question:

Assuming the current market price is below our maximum bid, and the spot instance requested starts, then the market price rises above the maximum bid will the spot instance be allowed to finish the hour we've already been billed for or is it possible the instance will be terminated in less time than that? Is it theoretically possible for an instance to run for just a few minutes and then be terminated?


From http://aws.amazon.com/ec2/spot-instances/ :

Spot Instances perform exactly like other Amazon EC2 instances while running, and like other Amazon EC2 instances, Spot Instances can be terminated when you no longer need them. If you terminate your instance, you will pay for any partial hour (as you do for On-Demand or Reserved Instances). However, if the Spot Price goes above your maximum price and your instance is terminated by Amazon EC2, you will not be charged for any partial hour of usage.

I can find no way to interpret that except: If you are given only 5 minutes, you pay for zero hours. If you are given 1 hour 15 minutes, you pay for one hour. If are given 10 hours and 55 minutes, you pay for ten hours. If however you choose to stop running after 10 hours and 55 minutes, you pay for 11 hours.

So the answer is yes you can be given less than an hour, but no you are not billed if that happens.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.