Raghav Mishra
Raghav Mishra

Reputation: 579

Why did my spot request get cancelled automatically?

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

Upvotes: 0

Views: 1424

Answers (1)

Ahmed Nada
Ahmed Nada

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

Related Questions