Hibernation prerequisites - Amazon Elastic Compute Cloud

Hibernation prerequisites

Supported Linux AMIs

Must be an HVM AMI that supports hibernation:

AMI Xen - supported instance families only Nitro - supported instance families only
Amazon Linux 2 AMI released 2019.08.29 or later Supported Supported
Amazon Linux AMI 2018.03 released 2018.11.16 or later Supported Supported
CentOS version 8 AMI ¹ (Additional configuration is required) Not supported Supported
Fedora version 34 or later AMI ¹ (Additional configuration is required) Not supported Supported
Red Hat Enterprise Linux (RHEL) 8 AMI ¹ (Additional configuration is required) Not supported Supported

Ubuntu 20.04 LTS - Focal AMI released with serial number 20210820 or later ²

Supported Supported
Ubuntu 18.04 LTS - Bionic AMI released with serial number 20190722.1 or later ² Supported Supported
Ubuntu 16.04 LTS - Xenial AMI ² ³ (Additional configuration is required) Supported Supported

¹ For CentOS, Fedora, and Red Hat Enterprise Linux, hibernation is supported on Nitro-based instances only.

² We recommend disabling KASLR on instances with Ubuntu 20.04 LTS – Focal, Ubuntu 18.04 LTS - Bionic, and Ubuntu 16.04 LTS - Xenial. For more information, see Disable KASLR on an instance (Ubuntu only).

³ For the Ubuntu 16.04 LTS - Xenial AMI, hibernation is not supported on t3.nano instance types. No patch will be made available because Ubuntu Xenial ended support in April 2021. If you want to use t3.nano instance types, we recommend that you upgrade to the Ubuntu 20.04 LTS - Focal AMI or the Ubuntu 18.04 LTS - Bionic AMI.

To configure your own AMI to support hibernation, see Configure an existing AMI to support hibernation.

Support for other versions of Ubuntu and other operating systems is coming soon.

For information about the supported Windows AMIs, see Supported Windows AMIs in the Amazon EC2 User Guide for Windows Instances.

Supported instance families

  • Xen: C3, C4, I3, M3, M4, R3, R4, T2

  • Nitro: C5, C5d, M5, M5a, M5ad, M5d, R5, R5a, R5ad, R5d, T3, T3a

To see the available instance types that support hibernation in a specific Region

The available instance types vary by Region. To see the available instance types that support hibernation in a Region, use the describe-instance-types command with the --region parameter. Include the --filters parameter to scope the results to the instance types that support hibernation and the --query parameter to scope the output to the value of InstanceType.

aws ec2 describe-instance-types --filters Name=hibernation-supported,Values=true --query "InstanceTypes[*].[InstanceType]" --output text | sort

Example output

c3.2xlarge c3.4xlarge c3.8xlarge c3.large c3.xlarge c4.2xlarge c4.4xlarge c4.8xlarge ...

Instance size

Not supported for bare metal instances.

Instance RAM size

Must be less than 150 GB.

Root volume type

Must be an EBS volume, not an instance store volume.

EBS root volume size

Must be large enough to store the RAM contents and accommodate your expected usage, for example, OS or applications. If you enable hibernation, space is allocated on the root volume at launch to store the RAM.

Supported EBS volume types

  • General Purpose SSD (gp2 and gp3)

  • Provisioned IOPS SSD (io1 and io2)

If you choose a Provisioned IOPS SSD volume type, you must provision the EBS volume with the appropriate IOPS to achieve optimum performance for hibernation. For more information, see Amazon EBS volume types.

EBS root volume encryption

To use hibernation, the root volume must be encrypted to ensure the protection of sensitive content that is in memory at the time of hibernation. When RAM data is moved to the EBS root volume, it is always encrypted. Encryption of the root volume is enforced at instance launch.

Use one of the following three options to ensure that the root volume is an encrypted EBS volume:

  • EBS encryption by default – You can enable EBS encryption by default to ensure that all new EBS volumes created in your AWS account are encrypted. This way, you can enable hibernation for your instances without specifying encryption intent at instance launch. For more information, see Encryption by default.

  • EBS "single-step" encryption – You can launch encrypted EBS-backed EC2 instances from an unencrypted AMI and also enable hibernation at the same time. For more information, see Use encryption with EBS-backed AMIs.

  • Encrypted AMI – You can enable EBS encryption by using an encrypted AMI to launch your instance. If your AMI does not have an encrypted root snapshot, you can copy it to a new AMI and request encryption. For more information, see Encrypt an unencrypted image during copy and Copy an AMI.

Enable hibernation at launch

You cannot enable hibernation on an existing instance (running or stopped). For more information, see Enable hibernation for an instance.

Purchasing options

This feature is available for On-Demand Instances, including those that have a Reserved Instance billing discount applied to them. It is not available for Spot Instances. For information about hibernating a Spot Instance, see Hibernate interrupted Spot Instances.