How to move a Windows EC2 instance to another AWS account

ec2-iconHere are the steps that I’ve used to move some Windows Server EC2 instances to a different AWS account.  This method should work for any OS, but I’ve only tested with Server 2008 R2.

The simple version:

  1. In the source account, stop the instance
  2. Make a snapshot of the instance’s system volume
  3. Share the snapshot with the destination account number
  4. In the destination account, make a volume from the snapshot
  5. Create an instance with the same OS as the source instance
  6. Detach and delete the new instance’s system volume
  7. Attach the volume from step 4
  8. Start the instance

The detailed version:

  1. In the source AWS account, stop the instance
  2. Go to Volumes, search for your instance name or ID, choose the volume, and click Actions – Create Snapshot.  Note the Snapshot ID.
  3. Wait for the creation to finish, then click Permissions in the bottom pane and share with the destination account number (get it from the destination account by clicking on your username in the header and choosing “My Account”)
  4. In the destination AWS account, go to Snapshots.  Change the drop-down to “Private Snapshots”. Search for the Snapshot ID, select it, and click Action – Create Volume.  The default settings should be OK.  Click Create.  Note the Volume ID.
  5. Create an instance.  I don’t know any way to create one without launching, so launch it and then stop it.
  6. Go to Volumes, search for your instance name or ID, choose the volume, and note where it is attached (most likely /dev/sda1).  Click Actions – Detach, then Actions – Delete Volume.
  7. Search for the volume created in step 4 and choose it.  Click Actions – Attach Volume.  Fill in t the instance ID (you can search by name) and Device path from step 6 (most likely /dev/sda1).  Ignore the note about xvdf – xvdp.
  8. Start the instance

Leave a Reply

Your email address will not be published. Required fields are marked *