Changing max bid price of AWS Spot instance

Viewed 2585

Can I keep my spot instance in use by modifying my max bid price pro-grammatically(Python boto) as soon as the bid price increases, so as to stop it from terminating itself and manually terminate it once am done with my work. I know I can use the latest spot block to use the spot instance upto 6 hours, but it reduces the profit margin. So I wanted to know if I can modify my bid pricing on the go based on the current demand.

Thanks.

2 Answers

No way ! You cannot change your max price once the instance is running. in order to change the price of your bid, you must cancel it and place another bid.

No. It is not possible to change the bid price on an existing spot request. You will need to create a new spot request with the new bid price. However, any EC2 instances allocated with the first request will always be tied to that first request.

If your work cannot handle an EC2 instance terminating prematurely, then spot instances are not right for your work and you should use OnDemand or Reserved instances.

Related