Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got an application I'd like to move to EC2. It will likely spend more than half the day completely dormant, so I'm trying to come up with a good solution for starting and stopping it as needed. It takes a few minutes to start up from nothing, so it would be nice if i could hibernate the OS for quicker resumes. I've seen a couple forum discussions on the topic of hibernation within EC2, but never anything conclusive. Has anyone found a working solution to this, or at least some resources that could help me out?

share|improve this question
up vote 8 down vote accepted

This has been discussed on the EC2 forums.

Highlights, direct from Amazon's mouth:

  1. if you do manage to hibernate the OS your Instance will still be in a running state i.e. you will be paying for the instance.

  2. how do you plan to wake up this instance from it's sleeping state.

This really does not sound like it will work, We would recommend that you configure your instance to automatically launch all the services you need at boot time and use the stop/start feature of EBS backed instances as a solution to your problem.

(or, in plain English -- Don't bother. It won't save you any money, and it probably won't work anyway)

share|improve this answer
If you do suspend to disk the machine is in fact shut down and "waking" is turning the machine on. – Christopher Perrin Aug 7 '13 at 2:42

I just hibernated an EBS based Windows AMI and then restarted it and it resumed fine. I would guess Linux works the same (as long as it stores the hibernate data to an EBS volume and then powers off the virtual machine).

(hibernation was disabled in the AMI, I turned it on using

powercfg /H on

and then performing the hibernation with

shutdown /h


PS: Take note of this: when an instance is stopped and later started again, all the instance stores are reset! Operating systems don't like disk content changing between hibernate and resume. (after resuming the OS may still show some remains of the previous disk content that is cached in the OS file cache)

share|improve this answer
Yes, but did you pay for the time it was hibernating? – Michael Hampton Aug 7 '13 at 0:23
And prior to the other answer, this is still not a supported solution. – Frederik Nielsen Aug 7 '13 at 0:58
The instance is stopped. they don't charge for stopped state. Quoting from "Pricing is per instance-hour consumed for each instance, from the time an instance is launched until it is terminated or stopped." Or from… Q: What defines billable EC2 instance-hours? Instance-hours are billed for any time your instances are in a “running” state. If you no longer wish to be charged for your instance, you must "stop" or "terminate" the instance to avoid being billed for additional instance-hours. – David Balažic Aug 7 '13 at 1:05
As for billing, I did not run long enough to be able to tell. – David Balažic Aug 7 '13 at 1:29
Interesting. When I tried hibernating a Linux instance, it didn't work. That was over a year ago though, so it's entirely likely that things have caged since then. I'll do some more experimentation. – Dan Aug 7 '13 at 10:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.