amazon-web-servicesamazon-ec2spot-instances

Hibernating EC2 spot instances. When is it possible, when is it not?


I'm confused about when you can or cannot hibernate spot instances.

(1.) Under "Hibernation prerequisites," the documentation says that hibernation "is available for On-Demand Instances and Reserved Instances. It is not available for Spot Instances. For more information, see Hibernating interrupted Spot Instances." https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites

(2.) But the following article: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-interruptions.html#hibernate-spot-instances

... says that you can set instances to automatically hibernate upon interruption.


What explains this apparent contradiction?

My guess would be that you cannot manually initiate hibernation from a spot instance, but you can configure a spot to hibernate automatically upon interruption. Is that right?


Solution

  • You cannot manually hibernate a Spot Instance.

    However, a Spot Instance can be hibernated automatically if the Spot Instance is interrupted and hibernation has been configured.

    See: Preparing for instance hibernation