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.

There's a command in the AWS EC2 API called ec2-register or ec2reg which has an argument -s for snapshot ID. You are able to create an image from a snapshot. I'd like to be able to do this in Python (currently using boto), but it doesn't look like it's built in functionality within boto yet. Is there still a way using boto to create an image from a snapshot id? Also assume, architecture, kernel, and other attributes are available and S3 access if necessary. Thanks.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Yes, boto does have an AMI registration function. Please look at http://readthedocs.org/docs/boto/en/latest/ref/ec2.html#boto.ec2.connection.EC2Connection.register_image.

You need to register an AMI with every option except for "image_location". Specify your snapshot id when making the block device mapping object for whatever you specified as your "root_device_name".

share|improve this answer

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.