Transferring an EC2 Instance to Another AWS Account: A Step-by-Step Guide
To move an existing EC2 instance from one AWS account to another, follow the steps mentioned below.
Step 1:
Log in to the AWS account where the EC2 instance is running, and ensure that you select the appropriate region in the upper right corner where the instance is located.
Step 2:
Select the instance that needs to be transferred to the other account from the list. To create an image of this instance
- Click on 'Actions'
- Select 'Image' from the dropdown
- And then choose 'Create Image' from the submenu.
Step 3:
A 'Create Image' pop-up will appear. Provide the required details such as the image name and description, and then click on the 'Create Image' button.
Step 4:
From the side menu, click on 'AMIs' and wait until the image is created. Usually, this process takes around 2-10 minutes.
Step 5:
Meanwhile, log in to the other AWS account (you can use a private or separate browser window) where you want to move the instance.
Click on 'My Account' from the header menu.
Step 6:
Copy the user account Id
Step 7:
Next, go back to the listing page where the image was created. To modify the permissions, click on 'Modify Image Permissions' from the 'Actions' dropdown.
Step 8:
A pop-up will appear for modifying the image permissions. Here, select the image to be in private mode and paste the account ID that was copied earlier. Finally, click on the 'Save' button.
Step 9:
By following the above steps, you have successfully transferred the EC2 instance image from one server to another. You can verify this by clicking on 'AMIs' in the EC2 console.
Step 10:
You may not be able to see the newly transferred EC2 instance image immediately.
To view it, click on the 'Owned by me' dropdown button and select the option (either 'Public' or 'Private') based on the permissions that were set earlier. In this case, it is set as private.
Step 11:
Now you should be able to view the shared image.
Step 12:
Now, from the requesting account, go to the EC2 dashboard and click on 'Launch Instance'.
Step 13:
Select 'My AMIs' from the menu.
Step 14:
Click on 'Ownership' from the menu, and ensure that you select the 'Shared by me' option.














Comments
Post a Comment