Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

When launching an EC2 instance you have the option to select storage for your system but it seems to automatically choose a root volume for you. Is there a way to choose a root volume from among your EBS volumes?

I would like to be able to launch an instance with a root volume (without "delete on terminate" checked), make changes, terminate that instance, and at some later time, launch a new instance with that same root volume as before.

I know I can launch an instance with a new root volume, then mount the old one and copy the files over but that's some extra steps that I'd like to avoid. I also know it is possible to launch from a snapshot, however, if there are changes to the root volume, I'd have to create a new snapshot every time (and then change the snapshot id for root volume on next launch).

The CLI command ec2run didn't seem to have any extra features than the web. Is it possible to launch an instance with a EBS volume as root?

share|improve this question

1 Answer 1

This is an odd requirement. That said, you have a few options.

First option: you can just stop the server when you're not using it. You won't be charged for running the server, you will be charged EBS storage costs, but you'd be charged for that anyway.

Second option: stop the server when you're not using it, create an AMI from that server, and then terminate the "source" server. Then subsequent instance can be started from that AMI.

share|improve this answer
    
+1 for AMI. That's exactly what it can be used for. –  Nathan C May 28 at 22:14
    
I didn't think about using the "stop" feature (mainly because I thought you were still charged for stopped instances). Also, this type of re-use of a root partition I do fairly often in other VM setups like KVM and VirtualBox so I thought it would be easy in AWS. I guess not! –  imlepid May 28 at 22:19
1  
@imlepid - EC2 is not designed for that use case. If you're doing things right on EC2, none of your systems are "special" like this. You should be able to re-create any of your systems at any time, and have any of them fail at any time without significantly affecting your application. If you're treating EC2 like a "legacy" VPS provider, you're likely not using the correct provider. –  EEAA May 28 at 22:21
    
I agree. It's just a different environment that takes some getting used to. What I like about AWS is the extensibility of it all. I just have to get used to the "new" model. :) –  imlepid May 28 at 22:28

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.