I was happy to hear about EBS Backed AMI, but I am confused. It doesn't seems persistent at all.

I created EC2 instance using one of Amazon's Linux EBS Backed AMI. I updated and added http server and python. I noticed the EBS AMI has been added to the EBS Volume. Then I terminated the EC2 instance to continue my work some other time, once I terminated, everything was gone. The EBS Volume and all the changes that I made. Confused why EBS volume is gone? How this is persistent?

Then I did the same thing again above. This time I created and registered the AMI before shutting it down. But every update after creating new AMI is lost.

Everytime I update a file or other configuration, I don't want to register and create a new AMI. That seems tedious and inefficient. Why do they call this EBS if everything is lost after terminating the instance? Am I doing something wrong? Is it possible to create a persistent AMI without need to register new image every time you update a file?

3 Answers 3


By default, EC2 instance "terminate" automatically deletes all EBS volumes that were automatically created with the instance, but this can be changed. It does not,by default, delete EBS volumes that were attached after the instance started running, and this also can be changed.

Here's an article I wrote on how to protect your important data with EBS boot instances:

Three Ways to Protect EC2 Instances from Accidental Termination and Loss of Data

Note: Instance failure should not automatically delete your EBS volume. However, EBS volume failure is itself one failure mode, so make sure you are creating regular EBS snapshots. Not only does this give you a backup to rely on, but it also magically and transparently increases the reliability of the EBS volume itself.


The EBS volume connected to the running EC2 instance will be deleted when you perform 'terminate'. Instead a 'stop' will keep everything intact.

You would need to re-create the AMI if you want it to contain your updates. Or a better method would be to build your AMI so that it pulls new configs/code when it boots up. You should look at 'user-data'.


Never terminate your instance if you don't want to lose the root EBS: stop it instead. You won't be charged any fee for the instance, since it's not running, but of course you'll still pay for the Gb of disk space allocated.

In the AWS management console you can also activate the terminate protection to avoid mistakes: right click on an instance and choose "Change Termination Protection".

  • How about failures, is that equivalent to termination?
    – user965363
    Sep 26, 2011 at 15:55
  • No, take a look also at "Change Shutdown Behavior" and be sure is set to stop. The root disk won't be deleted, but it might fail at some point of time, like any disk, so backing it up is advisable.
    – stivlo
    Sep 26, 2011 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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