EC2 - taking an EBS snapshot, saving to S3, and then launching instances from S3
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开发者_如何学C then launch from S3 without attaching a volume to the running instance - gaining the convenience of snapshots - without the running costs?
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.
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.
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, 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.
精彩评论