Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to create "Persistent Spot Instance" with AWS CloudFormation ? I'm going through the Autoscale and EC2 CloudFormation's template references but there is no mention how to set a property so the Spot requests stay persistent.

When the price bid lower than the actual spot price AWS brings the instances down. I would like the instances to be started automatically when the instance price is cheaper again. This can be set manually when creating a new spot instance request by checking the option "Persistent Request" in the "Request Instances Wizard".

share|improve this question

1 Answer 1

When using auto scaling, the spot requests are taken care of for you. Using auto scaling is like saying you want a persistent request. The auto scaling service makes new spot requests whenever your scaling policies are met, or whenever you're below desired capacity. If an instance comes down because your bid price is lower than current spot price, auto scaling will make another request once it senses that you're below desired capacity. Those requests are fulfilled when prices come below your bid.

To minimize downtime, I recommend setting the availability zones property in your auto scaling group to use all the availability zones in your region, since bidding for spot instances is on a per-availability zone basis. If one availability zone is currently above your bid (or down completely), another may be below, and the availability zone for your instance will be "swapped" with minimal downtime.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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