Transfer Amazone EC2 instance to a different AWS account

Ankit Kumar Rajpoot
4 min readDec 28, 2019

--

It’s not possible to transfer existing instances between AWS accounts. Instead, you can manually migrate an EC2 image from one AWS account to another. First, create an Amazon Machine Image (AMI) based on the original EC2 instance from the source account. Then, share the AMI with the target account, and launch a new instance based on that AMI from the target account. Finally, create your own copy of the AMI on the target account to begin using it on a different account.

Step1- Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

Step2- Select a particular instance for making AMIs image, right-click then choose Image/Create Image.

Step 3- Fill details and create an image.

In the navigation pane, choose AMIs. You will see AMIs image is pending, it takes time depending on the size. After some time it will be available.

Select your AMI in the list, and then choose Actions, Modify Image Permissions.

Find Account id(Number) from the target account’s My Account section.

Specify the AWS account number of the user with whom you want to share the AMI in the AWS Account Number field, then choose Add Permission.

To share this AMI with multiple users, repeat this step until you have added all the required users.

To allow create volume permissions for snapshots, select Add “create volume” permissions to the following associated snapshots when creating permissions. Choose Save when you are done.

Finding a Shared AMI in same Region-

Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

In the navigation pane, choose AMIs. Remember it will find in the same region which was in the older AWS account.

In the first filter, choose Private images. All AMIs that have been shared with you are listed. To granulate your search, choose the Search bar and use the filter options provided in the menu.

After finding a shared image choose Launch for creating a new AWS instance.

Select, which type of instance do you want?

After selecting the ance type, select the Review and Launch button, Download key for CLI.

Download the key.

After completing all steps, you see in instances section that instance is initiating.

Note:- For any query, you may comment in this section or message me on Facebook.

--

--

Ankit Kumar Rajpoot
Ankit Kumar Rajpoot

Written by Ankit Kumar Rajpoot

I’m a MERN Developer. ( Redux | AWS | Python ) I enjoy taking on new things, building skills, and sharing what I’ve learned.

No responses yet