Amazon EC2 migration from one region to the other
I'm using the following Amazon EC2 resources in the US East (Virginia) region:
- 1 Running Instance
- 1 Elastic IP
- 2 EBS Volumes
- 100 EBS Snapshots
- 1 Key Pair
- 2 Security Groups
- 5 My Own AMIs (customized based on my application stack)
My instance is based on Linux distribution (CentOS) and my AMIs are S3-backed. Both EBS volumes are mounted on this running instance.
We're planning to migrate our deployment to US-West region. Because Amazon EC2 resources are not shared across regions, my questions are:
- What are all the factors that I need to consider in advance?
- What are all the recommended & different ways of migrating each EC2 resources from one region to the other?
- Are there any hidden risks involved during and/or after the migration?
Experts ideas/suggestions/recommendations on this are highly appreciated.
We run AMIs in three regions. The key point is that regions are completely separated, so you will have to move everything to other regions (via S3) and recreate your security groups etc.
For the move itself, Elastifox is a great help: http://aws.amazon.com/developertools/609
It is more powerful then the Web interface and helps with moving AMIs.
Potential problems that we encountered:
Moving AMIs (the copying) can take hours! So plan enough time for this.
Sometimes we had problems registering the AMI or it arrived corrupted. I am not really sure what caused these issues, but we could always solve them (in the worst case we had to copy the AMI again - did I mention to plan enough time ;)
We are using own Python package django-fabfile (based on boto and Fabric) for replicating several tens of production Ubuntu instances into backup region. Snapshots are updated daily in backup regions. In case if instances should be restored in backup region new AMI could be created and launched in few moments.