To hibernate an instance, you must first enable it for hibernation while launching the instance.
Important
You can't enable or disable hibernation for an instance after you launch it.
Topics
Enable hibernation for
On-Demand Instances
Use one the following methods to enable hibernation for your On-Demand Instances.
To enable hibernation for an On-Demand Instance
-
Follow the procedure to launch an instance, but don't launch the instance until you've completed the following steps to enable hibernation.
-
To enable hibernation, configure the following fields in the launch instance wizard:
-
Under Application and OS Images (Amazon Machine Image), select an AMI that supports hibernation. For more information, see AMIs.
-
Under Instance type, select a supported instance type. For more information, see Instance families.
-
Under Configure storage, choose Advanced (at the right), and specify the following information for the root volume:
-
For Size (GiB), enter the EBS root volume size. The volume must be large enough to store the RAM contents and accommodate your expected usage.
-
For Volume type, select a supported EBS volume type: General Purpose SSD (
gp2
andgp3
) or Provisioned IOPS SSD (io1
andio2
). -
For Encrypted, choose Yes. If you enabled encryption by default in this AWS Region, Yes is selected.
-
For KMS key, select the encryption key for the volume. If you enabled encryption by default in this AWS Region, the default encryption key is selected.
For more information about the prerequisites for the root volume, see Prerequisites for Amazon EC2 instance hibernation.
-
-
Expand Advanced details, and for Stop - Hibernate behavior, choose Enable.
-
-
In the Summary panel, review your instance configuration, and then choose Launch instance. For more information, see Launch an EC2 instance using the launch instance wizard in the console.
Enable hibernation for
Spot Instances
Use one of the following methods to enable hibernation for your Spot Instances. For more information about hibernating a Spot Instance on interruption, see Spot Instance interruptions.
You can use the launch instance wizard in the Amazon EC2 console to enable hibernation for a Spot Instance.
To enable hibernation for a Spot Instance
-
Follow the procedure to request a Spot Instance using the launch instance wizard, but don't launch the instance until you've completed the following steps to enable hibernation.
-
To enable hibernation, configure the following fields in the launch instance wizard:
-
Under Application and OS Images (Amazon Machine Image), select an AMI that supports hibernation. For more information, see AMIs.
-
Under Instance type, select a supported instance type. For more information, see Instance families.
-
Under Configure storage, choose Advanced (at the right), and specify the following information for the root volume:
-
For Size (GiB), enter the EBS root volume size. The volume must be large enough to store the RAM contents and accommodate your expected usage.
-
For Volume type, select a supported EBS volume type: General Purpose SSD (
gp2
andgp3
) or Provisioned IOPS SSD (io1
andio2
). -
For Encrypted, choose Yes. If you enabled encryption by default in this AWS Region, Yes is selected.
-
For KMS key, select the encryption key for the volume. If you enabled encryption by default in this AWS Region, the default encryption key is selected.
For more information about the prerequisites for the root volume, see Prerequisites for Amazon EC2 instance hibernation.
-
-
Expand Advanced details, and, in addition to the fields for configuring a Spot Instance, do the following:
-
For Request type, choose Persistent.
-
For Interruption behavior, choose Hibernate. Alternatively, for Stop - Hibernate behavior, choose Enable. Both fields enable hibernation on your Spot Instance. You need only configure one of them.
-
-
-
In the Summary panel, review your instance configuration, and then choose Launch instance. For more information, see Launch an EC2 instance using the launch instance wizard in the console.
View if an instance is
enabled for hibernation
Use the following instructions to view whether an instance is enabled for hibernation.
To view if an instance is enabled for hibernation
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/
. -
In the navigation pane, choose Instances.
-
Select the instance and, on the Details tab, in the Instance details section, inspect Stop-hibernate behavior. Enabled indicates that the instance is enabled for hibernation.