Over a million developers have joined DZone.

How to Move Servers Between AWS Accounts

DZone's Guide to

How to Move Servers Between AWS Accounts

· Cloud Zone
Free Resource

Deploy and scale data-rich applications in minutes and with ease. Mesosphere DC/OS includes everything you need to elastically run containerized apps and data services in production.

This is a short post about how to move your (EC2) server from one account to another. I got in this situation a few ago and wanted to move our WordPress server from one account to another. Of course I could setup a new clean WordPress instance (like I described here) and load an WordPress XML export into the new environment. But luckily it is much easier then that, with less risk of errors. The trick here is to create a personal AMI under the old account and share that AMI to the new account. With the new account you initiate a new EC2 instance based on the shared AMI. Here are all necessary steps including screen shots:

  • Select the EC2 instance in the ‘old’ account
  • After selecting the EC2 instance create an AMI out of it by selecting the corresponding action:
    Screen Shot 2013-03-10 at 13.52.39
    After selecting the EC2 instance create an AMI out of it by selecting the corresponding action.

  • Set the AMI permissions
  • After the AMI is created, select it in the AMI overview and press the ‘Permissions’ button:
    Screen Shot 2013-03-10 at 13.58.25

  • Add the AWS account ID of the ‘new’ account
  • To give the new account access to this specific AMI add it’s AWS account ID to this list:
    Screen Shot 2013-03-10 at 13.59.45
    You can find your account ID here

  • Select AMi with the new account
  • Log out of AWS with the old account and login with the new one. Now select the AMI option on the left side of menu and filter the AMI’s on ‘Private Images’:
    Screen Shot 2013-03-10 at 14.04.38

  • Create new instance based on the AMI
  • The final step is to create a new instance based on the AMI. After it is launched you have an exact copy of the same machine within the new account:
    Screen Shot 2013-03-10 at 14.07.43

Of course it is a good idea to create (regular) backups of the new instance and shutdown the instance in the old account so you don’t have to pay for that one anymore.

Discover new technologies simplifying running containers and data services in production with this free eBook by O'Reilly. Courtesy of Mesosphere.


Published at DZone with permission of Pascal Alma. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}