Search code examples
amazon-ec2-spot-market

Stopping spot instance temporarily


This is about this recent announcement:

https://aws.amazon.com/about-aws/whats-new/2020/01/amazon-ec2-spot-instances-stopped-started-similar-to-on-demand-instances/

But I can see a smililar feature introduced in the year 2017

https://aws.amazon.com/about-aws/whats-new/2017/09/amazon-ec2-spot-can-now-stop-and-start-your-spot-instances/

1) I will like to know the difference between the two announcements. 2) When I tried to stop my spot instance, I got this error:

Error stopping instances
You can't stop the Spot Instance 'i-0f298e1710169xxxx' because it is in a fleet, which does not support stop

I will like to stop the instance to save cost.


Solution

  • When capacity is no longer available at your preferred price instance will be terminated. 2017 announcement allows instances to be stopped in the event of interruption, instead of being terminated with maintain interruption behavior option.

    This preserves attached volumes, and when capacity becomes available at preferred price - instance is started up back rather than new instance being spun up.


    2020 announcement allows you to manually stop / start spot instances at will at any time, not just when it is about to be terminated due to no capacity. This feature is available for persistent Spot requests.

    AWS Spot Fleet takes control over instances lifetime and manages them automatically, so these are not persistent Spot requests and Fleet Spot instances cannot be stopped manually.

    To minimize costs you can configure Spot Fleet max cost, on-demand instance types, allocation strategy, etc.