Move EC2 Instances (part 1)

How to move an AWS EC2 Instance to another Subnet or AZ?

Guillermo Musumeci
6 min readOct 14, 2019

--

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, AZs (Availability Zones), VPCs (Virtual Private Clouds), 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):

The process of moving an EC2 instance to another Subnet / AZ using AWS CLI can take up to 11 steps:

  1. Save the list of Security Groups attached to the source using the CLI command describe-security-groups.
  2. Save the list of Tags attached to the…

--

--

Guillermo Musumeci

Certified AWS, Azure & GCP Architect | HashiCorp Ambassador | Terraform SME | KopiCloud Founder | ex-AWS | Entrepreneur | Book Author | Husband & Dad of ✌