Take the 2-minute tour ×

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?

share|improve this question

migrated from stackoverflow.com Sep 28 '11 at 3:03

This question came from our site for professional and enthusiast programmers.

3 Answers 3

up vote 5 down vote accepted

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:


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.

share|improve this answer

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'.

share|improve this answer

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".

share|improve this answer
How about failures, is that equivalent to termination? –  user965363 Sep 26 '11 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 '11 at 15:57

Your Answer


