What happens when an EC2 instance hibernates?
EC2 Hibernation allows you to pause and resume your running EC2 instances, which can help lower costs and achieve faster startup times.
When an instance hibernates, it signals the operating system to perform hibernation (suspend-to-disk).
The contents of instance memory (RAM) are saved to its Amazon EBS root volume. This allows the instance to resume from the exact state it was in before hibernation.
When you start your instance, the Amazon EBS root volume is restored to its previous state and the RAM contents are reloaded. Previously attached data volumes are reattached and the instance retains its instance ID.
We don't charge usage for a hibernated instance when it is in the stopped state, but we do charge while it is in the stopping state, unlike when you stop an instance without hibernating it.
Hibernation is supported for certain EC2 instance types running specific operating systems, such as Amazon Linux, Amazon Linux 2, Ubuntu, and Windows Server. The supported instance types and OS versions can vary by AWS Region.
To hibernate an instance, it must be enabled for hibernation and meet the hibernation prerequisites. You can hibernate an instance using the AWS Management Console, AWS CLI, AWS SDKs, or AWS Tools for PowerShell.
When an instance is hibernated, you are not charged for instance usage, only for the storage of the EBS volumes, including the storage used for the RAM contents.
Hibernation can be useful for pre-warming instances that take a long time to bootstrap and build their memory footprint, allowing you to quickly resume them to a desired state when needed.
We don't charge usage for data transfer fees, but we do charge for the storage for any Amazon EBS volumes, including storage for the RAM data.
When you start your hibernated instance, it enters the pending state, and we move the instance to a new host computer (though in some cases, it remains on the current host).
Comments
Post a Comment