An engineer hibernates an EC2 instance overnight instead of leaving it running, in order to save cost while preserving its exact in-memory state for the next morning. Which statement about billing during hibernation is correct?
- The company is billed the full On-Demand instance rate the entire time it is hibernated
- The company is billed nothing at all, including for the storage used by the saved RAM contents
- The company is not billed for instance usage while hibernated, but continues to pay for EBS storage, including the space used to store the RAM contents
- The company is billed a reduced, discounted instance rate while hibernated, similar to a Spot Instance
Why C? And why not the others?
Correct answer: C. The company is not billed for instance usage while hibernated, but continues to pay for EBS storage, including the space used to store the RAM contents
Hibernation saves an instance's RAM contents to its EBS root volume and then leaves the instance in the stopped state, and because compute usage is not billed for a stopped instance, AWS does not charge for instance usage or for the data transfer involved in writing RAM to the root volume while hibernated; what does continue to be billed is ordinary EBS storage, which now includes the extra space consumed by the saved memory contents, so the true cost is not zero. Billing the full On-Demand rate throughout is wrong because stopped and hibernated instances are never charged for compute time. Claiming zero charges overlooks the ongoing EBS storage cost for the volume holding both the root filesystem and the RAM snapshot. There is no discounted hibernation-specific instance rate comparable to Spot pricing; the only cost incurred is the standard EBS storage charge.
Source: AWS EC2 documentation: Hibernate your Amazon EC2 instance — billing during hibernation