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.

Before EBS based AMIs were available, it was possible to use the command ec2-migrate-image in order to migrate AMIs to different regions.

Is there a simple way to do the same for EBS based AMIs? Either using the official amazon EC2 API command line tools or using a library like boto?

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

Amazon has not provided a simple command line interface to copy EBS boot AMIs between regions like they did with S3 based AMIs.

In order to copy an EBS boot AMI, you need to start instances in both regions and copy the EBS snapshot from one region to the other using a temporary EBS volume attached to each instance.

I recommend using rsync with appropriate options to copy the file system, instead of copying the block device, as this is faster and should result in a smaller snapshot.

After the new snapshot has been created in the new region, you register it as an AMI, making sure you specify the correct architecture/AKI/ARI matching the ones in the source region.

I've written up the specific command lines necessary to accomplish all of this:

Copying EBS Boot AMIs Between EC2 Regions
http://alestic.com/2010/10/ec2-ami-copy

It is possible to put this together into an automated process, if that's what you need.

share|improve this answer
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.