Reputation: 579
I had requested a Spot instance for a single instance of t2.micro. An instance was assigned and the request was active. A few days later, after the instance ran for 9 days, the spot request was "cancelled". The status of the request was cancelled and the instances were terminated.
Questions:
Upvotes: 0
Views: 1424
Reputation: 226
As a best practice for Spot, don't set a maximum price at all. it will be set to on-demand price by default and Spot prices can't go above on-demand prices so you won't be interrupted because of price change.
The only reason you will be interrupted is when EC2 needs this capacity back for on-demand customers, which is the reason for Spot discounted prices.
Use Auto Scaling groups and Spot Fleet to launch and maintain a target capacity, and to automatically request instances to replace any that are interrupted.
Upvotes: 2