šŸ’¤ What is EC2 Hibernate in AWS?

Generated image

EC2 Hibernate is a feature that allows you to pause your Amazon EC2 instance and resume it later without losing in-memory data. It works similar to closing your laptop lid — your OS, processes, and memory (RAM) are saved to disk, and the instance can be restored exactly as it was.


🧠 How EC2 Hibernate Works:

  • When hibernation is triggered (manually or automatically),
  • The contents of RAM are saved to the root EBS volume,
  • The instance stops (not terminated),
  • When restarted, memory is reloaded, and the OS continues as if nothing happened.

🧩 Key Benefits:

Benefit Description
Faster boot time Resume from saved state instead of fresh OS boot
Preserve app state Keeps open sessions, processes, and cached data
Cost-effective No charges while instance is stopped (only storage charged)

āœ… Requirements for EC2 Hibernate:

  • Supported instance types (e.g., C5, M5, T3, R5, etc.)
  • Instance must use Amazon EBS for root volume
  • Less than 150 GB RAM
  • Hibernation enabled at launch
  • Encrypted root volume

āš ļø Hibernate vs Stop vs Terminate

Action Preserves Memory (RAM) Stops Billing Instance Returns to Same State
Hibernate āœ… Yes āœ… (compute only) āœ… Yes
Stop āŒ No āœ… (compute only) āŒ Fresh boot
Terminate āŒ No āœ… (everything) āŒ Cannot be resumed

šŸ’» Use Cases:

  • Long-running data science experiments
  • Infrequent dev/test environments
  • Pause/resume applications with large startup states
Back to blog

Leave a comment