Stopping spot instance temporarily

大兔子大兔子 提交于 2021-02-11 06:14:14

问题


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.


回答1:


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.




回答2:


The error you got (your point 2) may be solved with the following.

In this article, it can be read:

This feature (Spot service stop instead of terminate your Amazon EBS-backed Spot Instances) is available for persistent Spot requests and Spot Fleets with the maintain fleet option enabled.



来源:https://stackoverflow.com/questions/59730890/stopping-spot-instance-temporarily

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!