I have an an Amazon EC2 instance that seems to be running on an EBS Volume. When i tried to "stop" it, i was told i would lose the data on the ephemeral storage.

I want to switch the machine off for about a month because i am being billed and im not currently using it.

If i switch this machine off, will i lose my actual data on the machine? My understanding is that the ephemeral storage is temporary storage allocated to the machine, but data saved inside the machine is persistent provided the volume is on EBS?

I've read a few blogs regardings this, but the information is confusing which is why i am asking here.


As long as you stop your instance, and not terminate it, the EBS volume remains untouched and will still be attached to your instance. It will be available at the next boot, in 1 month.

Quoting from http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/AmazonEBS.html :

If you are using an EBS-backed instance, you can stop and restart that instance without affecting the data stored in the attached volume. The volume remains attached throughout the stop-start cycle. This allows you to process and store the data set indefinitely, only using the processing and storage resources when required. The data set persists in the volume until the volume is deleted. After a volume is deleted it cannot be attached to any instance.

However, you will still be charged for the used EBS storage.

  • All ephemeral storage will be lost regardless of whether you stop or terminate the instance.
  • EBS storage will persist if you stop the instance, and usually will also persist if you terminate it.

To clarify the above point - if the DeleteOnTermination flag is set, the EBS volume will be deleted when the instance terminates. By default, most root EBS volumes are set to be deleted on termination - you can change this using ec2-modify-instance-attribute. All EBS volumes you have manually attached to the instance default to having DeleteOnTermination set to false (i.e. they will persist).

S3 backed (instance store) AMIs cannot be stopped (only terminated). (Which makes sense, since the root disk would be re-provisioned, and the instance restored from the AMI anyway.)

If you do not intend to use this instance for a month, it would be more economical to:

  • take a snapshot of the root volume
  • terminate the instance
  • and delete the EBS volume.

Since snapshots are compressed (and only store actual 'data' - not provisioned space), this will likely cost significantly less - and will allow you to return to the same state (since all the ephemeral data will be lost anyway). If you already have existing snapshots the additional cost will further be reduced, since snapshots are differential. (You can, of course, create an AMI from a snapshot, and launch a new instance using that AMI at any time).

On the other hand, you will be charged for the space provisioned by your EBS volume(s), regardless of the actual amount used, for as long as they exist.

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.