Search code examples
amazon-web-servicesamazon-ec2

difference between hibernating and stopping an EC2 instance?


Obviously, hibernation and stop are two different actions that I can select. What's the difference?


Solution

  • Benefit of Hibernating over Stopping

    • The memory state is preserved
    • Since the memory state is perserved and loaded again when the instance start, this reduce the boot time of the instance.
    • The long running process can continue without interuption
    • A great benefit if you want to maintain the in-memory caching layer, or have some services that take a great amount of time to fully initialized.
    • Useful for EC2 instances that's on "eco-mode" with frequent stop/start cycles to save cost (E.g: Development/SIT Testing server with background service process)

    Under the hood
    The whole hibernation process in visual: Hibernation Process

    When the instance is in Stopping state, the instance memory is persisted in the instance's EBS root volume, and is loaded again when the instance start.

    Reference
    AWS Instance Hibernate Overview