2

I heard of a Polish Bitcoin exchange site that lost all it's data (supposedly worth a lot of money) because the owner didn't know that his snapshot would vanish when he stopped the EC2 instance.

Now my question is: Is there any way to 'completely' save the state of an EC2 instance? Saving the AMI? Is that it? What actions take place when you save an AMI?

2

I suspect that what happened in the case of this Bitcoin exchange is that the data was stored on an EBS volume that was marked to "delete on termination" and the site operator had never taken any snapshots. This (delete volume on termination) is the default for the root file system of an EBS-backed instance, but it can be modified.

An AMI is a combination of:

  1. block device mappings (ephemeral and/or EBS)
  2. a kernel
  3. a ram disk

If your instance is EBS-backed (you have an EBS volume for your root file system), it is sufficient to create a snapshot of this EBS volume. If you need to launch a new instance based off your EBS snapshot, you would register a new AMI with the same kernel and RAM disk as your original AMI, but with an EBS volume created from your snapshot as the new root device.

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.