I want to move my Amazon Elastic Compute Cloud (Amazon EC2) instance from one AWS account to another.
Short description
To migrate an EC2 instance to another account, you must create an Amazon Machine Image (AMI) of the instance in the source account. Then, share the AMI with the destination account and create a new instance. You can't directly transfer an instance between accounts.
Resolution
Complete the following steps:
- From the source account, create an AMI of the instance.
- From the source account, share the AMI with the destination account.
Note: If your AMI contains encrypted snapshots, then you must also share the encryption keys.
- From the destination account, open the Amazon EC2 console.
- In the navigation pane, choose Images, and then choose AMIs.
- Select Owned by me, and then choose your AMI.
- Choose Launch instance from AMI.
- (Optional) Recreate the security group configuration for the instance in the destination account.
Note: Security groups don't transfer between accounts.
- (Optional) Recreate and attach the instance's AWS Identity and Access Management (IAM) roles in the destination account.
- (Optional) Add tags to the instance in the destination account.
Note: The destination instance has different private and public IP addresses from the source instance.
Related information
Copy an Amazon EC2 AMI