0
votes

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:

  1. Why was the request cancelled? I had set a normal bid price that of a much higher value than the spot price.
  2. I checked the records, and it shows event : bitChange that lead to the request to move to status closed . Even if the bid price changed, I'm pretty sure it did not cross my bit price. as it was too high.
  3. What exactly happened? Why did the instance move to close? Can someone please explain me?

enter image description here

1
A similar question was asked on AWS discussion forum back in Dec 2020, and was never answered. See here. I'd approach AWS support.Avi Nehama
Hey @AviNehama Thanks for the ref. I have updated the post there and asked the same. I'll try to contact AWS support as well.Raghav Mishra

1 Answers

1
votes

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.