EC2 - taking an EBS snapshot, saving to S3, and then launching instances from S3
Asked Answered
R

3

7

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?

Rabiah answered 16/3, 2010 at 12:22 Comment(0)
P
8

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.

Precept answered 16/3, 2010 at 12:40 Comment(3)
But can I launch new instances based on the S3 snapshot and not the stored volume?Rabiah
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).Arvie
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?Precept
G
3

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.

Gallon answered 4/6, 2010 at 16:6 Comment(0)
C
2

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.

Chromyl answered 6/6, 2010 at 2:17 Comment(2)
There is a manual entry "Converting an instance store-backed AMI to an Amazon EBS-backed AMI" in the Amazon Documentation: docs.amazonwebservices.com/AWSEC2/latest/UserGuide/…Mchail
Even when you are on a EBS root you can mount the ephermal (local) storage disk for swap, temp and work directories in order to reduce the EBS IOPS and increase performance (latency seems to be better).Mchail

© 2022 - 2024 — McMap. All rights reserved.