Over the last 5 or 6 years, I’m been working with very large AWS environments, first, for a couple of banks in Singapore and Paris, then as Solutions Architect for AWS Singapore, later as Principal Cloud Architect for a (defunct) startup and finally worked as Cloud Architect architecting, deploying and managing AWS infrastructure for the largest AWS customer in the Middle East.
One of the most common challenges, when you are using AWS to run IaaS, is moving EC2 instances between Subnets, VPCs, AWS Regions and AWS accounts.
So, there are 4 different scenarios to migrate AWS EC2 Instances (the move is, in fact, a new copy of the source EC2 instance):
- Move EC2 Instances to another Subnet (part 1)
- Move EC2 Instances to another VPC (part 2) - this document
- Move EC2 Instances to another AWS Region (part 3)
- Move EC2 Instances to another AWS Account (part 4)
The process of moving an EC2 instance to another VPC using AWS CLI can take up to 12 steps:
- Save the list of Security Groups attached to the source using the CLI command describe-security-groups.
- Save the list of Tags attached to the source EC2 instance using the CLI command describe-tags.