views:

1350

answers:

3

I like the convenience of taking an AMI snapshot - but ideally I do no want to pay for the volume to be attached to my running instance.

Is there a way to save a snapshot instance to S3 and then launch from S3 without attaching a volume to the running instance - gaining the convenience of snapshots - without the running costs?

A: 

EBS snapshots are already persisted to S3 (http://aws.amazon.com/ebs/)
from ebs docs:

Amazon EBS also provides the ability to create point-in-time snapshots of volumes, which are persisted to Amazon S3. These snapshots can be used as the starting point for new Amazon EBS volumes, and protect data for long-term durability. The same snapshot can be used to instantiate as many volumes as you wish

and AMIs are also stored in S3.

Joshua Smith
But can I launch new instances based on the S3 snapshot and not the stored volume?
git-noob
Yes - The AMI that you launch your instance from is stored in S3, not on an EBS volume (use an S3 browser to see that it's just a manifest XML file plus a bunch of ZIP files that make up the image).
gareth_bowles
Your question title indicates you are asking about EBS snapshots but in your comment you are referencing AMIs. Are you talking about EBS snapshots or AMI snapshots?
Joshua Smith
A: 

It's true that with an EBS volume you are paying for the allocated space, even if you are just using a fraction of it for data.

If you are just looking to store the data, you can use any tool to "backup" the data to S3 directly, then restore it to a volume when you need to. S3sync works well for this, so does creating a tarball.

Nick
A: 

It's not just an allocated vs used space issue. With EBS you are also paying for I/O ops while the volume is mounted.

I am trying to do the same thing -- migrate an EBS-backed instance to an S3-backed instance. Other threads here on SO state that this can't be done [1], but a response to an AWS forum post by Eric Hammond suggests that there is hope:

Using the concepts of swapping out a boot disk in a running EC2 instance as described in the following thread

http:// developer.amazonwebservices.com/connect/thread.jspa?threadID=42437

you might be able to create an EBS volume in the new region with a copy of the raw bits from the old region's volume, then swap the new volume into a stopped Windows instance in the new region.

Once that's working, normal AMI creation from the running instance should be possible

Not for the timid, but if it's important you might be able to find an EC2 Windows expert who can help with the steps.

Not exactly definitive, but Eric knows what he's talking about, so if it's important enough to you you can give it a try.

1 - stackoverflow.com/questions/2453852/ec2-booting-from-an-ebs-snapshot-and-then-detaching-the-volume-to-reduce-costs

sbc