TL;DR: Hibernation (2017) is the laptop-lid close for EC2: it writes RAM to the root EBS volume and shuts down, then reloads memory on start so apps resume in 30–60 seconds with warm caches, loaded models, and warm DB connections — no 5–10 minute cold boot or re-initialization. You stop paying compute (still pay EBS). It shines wherever warm-up is expensive — ML training, data jobs with GB of reference data in RAM, dev environments — but it's a tactical tool with real constraints, not something to build your architecture around.
The numbers
- While hibernated you pay EBS (root volume + RAM snapshot + attached volumes) and any Elastic IPs; you don't pay compute or data transfer.
- Root volume must hold RAM + OS — size it to ~RAM + 10–20 GB; a 16 GB instance needs 16 GB+ free just for the snapshot.
- Field examples: an ML researcher hibernating a p3.2xlarge (
$3/hr)$740/mo)** after EBS plus 15 min saved every morning; a dev lead hibernating 15 m5.large outside business hours netted14 hrs/day netted **$37/day ($147/week ($7,600/yr).
Do this
- Launch with hibernation enabled and an encrypted root volume — both are required and neither can be retrofitted onto an existing instance.
- Use a supported instance type + AMI (T2/T3, M5, C5, R5, Amazon Linux 2/Ubuntu/Windows, etc.) — check before assuming.
- Hibernate instead of stop from console/CLI (automation must pass
--hibernatetostop-instances, or you'll just do a normal stop and lose the state). - Use an Elastic IP or rely on private IPs + VPC endpoints — a plain public IP changes on resume and breaks hardcoded references/DNS/firewall rules.
- Run the math against simple stop/start — if boot time isn't painful, plain stop is simpler and you skip the RAM-snapshot storage.
Gotchas
- 60-day maximum — after that the instance just stops and the RAM snapshot is lost; not a "forget it for months" tool.
- EBS storage keeps billing while hibernated — the savings are compute-only, so short idle windows may not beat plain stop.
- Doesn't play with Auto Scaling Groups — it's for long-lived instances, not dynamic fleets.
- Combining with Spot is a calculated risk — a Spot interruption loses the hibernation state entirely; fine for interruptible work, not critical jobs.
Skip this if
- The instance is stateless and boots fast, ephemeral, or ASG-managed — hibernation adds complexity for little benefit; a simple stop/start (or EC2 Instance Scheduling) is the right lever.
- You mainly want off-hours savings on predictable schedules — EC2 Instance Scheduling handles that without the encryption/type constraints; pair hibernation with Spot Instances only for interruptible ML work.