Prerequisites for EC2 instance hibernation (original) (raw)

You can enable hibernation support for an On-Demand Instance or a Spot Instance when you launch it. You can't enable hibernation on an existing instance, whether it is running or stopped. For more information, see Enable instance hibernation.

AWS Regions

You can use hibernation with instances in all AWS Regions.

AMIs

You must use an HVM AMI that supports hibernation. The following AMIs support hibernation:

AMIs for Intel and AMD instance types
AMIs for Graviton instance types

¹ For AL2023 minimal AMI, additional configuration is required.

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

³ We recommend disabling KASLR on instances with Ubuntu 22.04.2 LTS (Jammy Jellyfish), Ubuntu 20.04 LTS (Focal Fossa), Ubuntu 18.04 LTS (Bionic Beaver), and Ubuntu 16.04 LTS (Xenial Xerus). For more information, seeDisable KASLR on an instance (Ubuntu only).

⁴ For the Ubuntu 16.04 LTS (Xenial Xerus) AMI, hibernation is not supported ont3.nano instance types. No patch will be made available because Ubuntu (Xenial Xerus) ended support in April 2021. If you want to use t3.nano instance types, we recommend that you upgrade to the Ubuntu 22.04.2 LTS (Jammy Jellyfish), Ubuntu 20.04 LTS (Focal Fossa) AMI, or the Ubuntu 18.04 LTS (Bionic Beaver) AMI.

⁵ Support for Ubuntu 18.04 LTS (Bionic Beaver) and Ubuntu 16.04 LTS (Xenial Xerus) has reached end of life.

To configure your own AMI to support hibernation, see Configure a Linux AMI to support hibernation.

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

Instance families

You must use an instance family that supports hibernation. However, bare metal instances are not supported.

Console

To get the instance types that support hibernation
  1. Open the Amazon EC2 console athttps://console.aws.amazon.com/ec2/.
  2. In the navigation pane, choose Instance Types.
  3. Add the filter On-Demand Hibernation support = true.
  4. (Optional) Add filters to further scope to specific instance types of interest.

AWS CLI

To get the instance types that support hibernation

Use the describe-instance-types command. Note that the available instance types vary by Region.

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

PowerShell

To get the instance types that support hibernation

Use the Get-EC2InstanceType cmdlet. Note that the available instance types vary by Region.

(Get-EC2InstanceType `
    -Filter @{Name="hibernation-supported"; Values="true"}).InstanceType | Sort-Object

Instance RAM size

Linux instances – Must be less than 150 GB.

Windows instances – Must be less than or equal to 16 GB. For hibernating a T3 or T3a Windows instance, we recommend at least 1 GB of RAM.

Root volume type

The root volume must be an EBS volume, not an instance store volume.

Root volume size

The root volume 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.

Root volume encryption

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 volume type

The EBS volumes must use one of the following EBS volume types:

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 in the Amazon EBS User Guide.

Spot Instance requests

For Spot Instances, the following requirements apply: