Need Assistance?

In only two hours, with an average response time of 15 minutes, our expert will have your problem sorted out.

Server Trouble?

For a single, all-inclusive fee, we guarantee the continuous reliability, safety, and blazing speed of your servers.

How to Migrate EC2 Instance Between AWS Accounts

Table of Contents

Migrating an EC2 instance from one AWS account to another is a common scenario when consolidating environments, transferring workloads, or working with multiple clients. One of the simplest methods to migrate EC2 instance to another account is using AMIs (Amazon Machine Images). In this blog, we are going to discuss how to migrate an EC2 instance from one AWS account to another using AMI.

Steps to Migrate an EC2 Instance Between Accounts:

1. Create an AMI of the Source Instance

  • Log in to the source AWS account.
  • Go to EC2 Dashboard → Instances.
  • Select the instance you want to migrate, then choose Actions → Create Image (AMI).
  • Provide a name and description, then create the image.
  • This process creates both an AMI and an associated snapshot of the root volume.

2. Share the AMI and Snapshot With the Destination Account

  • Once the AMI is available, navigate to EC2 Dashboard → AMIs.
  • Select your AMI → Actions → Modify Image Permissions.
  • Add the AWS Account ID of the destination account.
  • Next, go to Snapshots.
  • Locate the snapshot linked with your AMI → Actions → Modify Permissions.
  • Add the destination account ID here as well (this step is mandatory, otherwise the AMI won’t work).

3. Access the Shared AMI From the Destination Account

  • Log in to the destination AWS account.
  • Navigate to EC2 Dashboard → AMIs.
  • Under the Private Images filter, you should now see the shared AMI from the source account.

4. Launch a New Instance Using the Shared AMI

  • Select the shared AMI → Launch Instance.
  • While configuring the instance, make sure to:
  • Choose the appropriate instance type (same as source or a different one as required).
  • Select the correct VPC and Subnet.
  • Attach the required security groups.
  • Assign a key pair (SSH key) that exists in the destination account.

5. Additional Considerations

  • Elastic IPs: Elastic IPs cannot be transferred. You’ll need to allocate a new one in the destination account.
  • IAM Roles: Re-create and attach any IAM roles if used by the source instance.
  • User Data or Startup Scripts: Verify that bootstrapping scripts (if any) work correctly in the new environment.
  • EBS Volumes: If the instance has additional volumes, repeat the snapshot sharing process for each.

Conclusion

By following these steps, you can easily migrate an EC2 instance between AWS accounts using AMIs. Always remember to double-check permissions, security groups, and networking configurations to ensure your new instance works exactly like the source.
Need expert help to Migrate EC2 instance to another account? Skynats offers professional AWS Managed Services and cloud migration services. Contact us today to ensure a seamless and secure migration

Liked!! Share the post.

Get Support right now!

Start server management with our 24x7 monitoring and active support team

Let us know your requirement.

Can't get what you are looking for?

Get Support Right Away!