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.

I have an EC2 instance whose root device is 'instance-store'. While trying to create AMI for same, i could not see any option in instances tab or under volumes tab. I want to stop this instance & preserve AMI for future use to launch instance from same AMI.

share|improve this question
add comment

migrated from stackoverflow.com Nov 8 '12 at 15:47

This question came from our site for professional and enthusiast programmers.

1 Answer

The AWS console only provides access to functions that can work without access to your instance's file system. Instance-store AMIs actually have the files bundled, compressed, and encrypted - and therefore need file system access. To create such an AMI, you need to use the command line, from within an instance. (Note the difference between this and an EBS backed instance - with the latter, a snapshot can be generated of the block device, irrespective of the contents of that device.

The process of creating an instance-store AMI is well documented by AWS. Essentially:

  • ec2-bundle-vol to create the AMI
    ec2-bundle-vol -d /mnt -k $EC2_PRIVATE_KEY -c $EC2_CERT -u USERID -s SIZE
  • ec2-upload-bundle to save it to S3
    ec2-upload-bundle -b BUCKETNAME -m MANIFESTFILE -a ACCESSKEY -s SECRETKEY
  • ec2-register to register the AMI (this last one can be done from the AWS console).

Depending on your specific scenario, you may also be able to copy the contents of your instance-store volume to an EBS volume and convert your instance to an EBS backed instance (which would be a better approach). See this question for some additional points.

share|improve this answer
    
Thanks for help. I want to take backup of this instance but can not do same as i can do with EBS backed instances. ANy procedure for same? –  Lalit Nov 19 '12 at 5:24
    
You cannot backup an S3 backed instance in the same way as an EBS backed on. You either have to create an bundle of the S3 instance, OR copy the files to another volume (e.g. with rsync - as a standard backup), OR convert the instance to EBS backed. –  cyberx86 Nov 19 '12 at 5:31
    
Thanks. I tried this winnersdontlose.com/?p=95 but was not able to succeed. Can you help? –  Lalit Nov 19 '12 at 9:39
add comment

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.