AWS SAA – Lecture 54: EC2 Hibernate

Published on
Written by Henry Nguyen

Phase Verbs / Action Phrases

PhraseMeaning
hibernate (an instance)freeze the OS and save RAM state to disk
dump (RAM to EBS)write in-memory data to the root EBS volume
preserve (in-memory state)keep the running processes/data intact across a stop
warm (a cache)pre-load data into memory at startup; skipped when hibernating
freeze / resume (the OS)pause execution and restore it exactly as it was

Technical Vocabulary

TermDefinition
HibernateEC2 state where RAM is written to the encrypted root EBS volume; instance resumes from that state
RAM dumpA snapshot of all data currently in memory, written to disk
Root EBS volumeThe EBS volume that holds the OS; used as RAM dump target during hibernate
In-memory stateAll processes, loaded libraries, and cached data currently running in RAM
Stop (EC2)Shut down instance; EBS data persists; RAM lost; cold boot on next start
Terminate (EC2)Delete instance; EBS root volume deleted by default; any additional volumes may persist
Hibernate (EC2)Pause instance; RAM written to EBS; resumes without OS reboot

Key Concepts

EC2 Instance States Comparison

ActionOS RebootRAMEBS RootBoot Time
Stop → StartYes, full OS bootLostKeptSlow (full boot + app init)
TerminateN/ALostDeleted (by default)N/A
Hibernate → StartNo (OS is frozen)Restored from EBSKeptFast (RAM restored, no reinit)

How Hibernate Works (Step by Step)

  1. Instance is running with data in RAM
  2. Hibernate command issued → instance enters “stopping” state
  3. RAM is dumped (written) to the root EBS volume
  4. Instance is shut down; RAM disappears
  5. Root EBS volume still holds the RAM dump
  6. On next start: RAM is loaded from EBS back into memory
  7. Instance resumes exactly where it left off — as if it never stopped

Requirements for Hibernate

  • Root volume must be EBS (not Instance Store)
  • Root EBS volume must be encrypted
  • Root EBS volume must be large enough to hold the entire RAM
  • Instance RAM size: < 150 GB
  • Not supported on bare metal instances
  • Supported OS: Linux, Windows
  • Available for: On-Demand, Reserved, Spot instances
  • Max hibernation time: 60 days

Use Cases

  • Long-running processes that must not be interrupted
  • Services with long initialization — skip re-initialization on restart
  • Fast boot requirement — hibernate and resume instead of cold start
  • Saving RAM state for later resume

Exam Tips

  • Hibernate = RAM saved to encrypted EBS → fast resume (OS never restarts)
  • Root EBS volume must be encrypted + large enough for RAM
  • Max hibernate duration: 60 days
  • Not available for bare metal instances
  • Key difference from Stop: Stop = cold boot; Hibernate = warm resume
  • Use hibernate when apps take a long time to initialize and you want to avoid that overhead