Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move Amazon AMI to another account [closed]

I have some machines created with my account. Some of them uses S3 storage, some EBS.

Now I need to move these machines to my company account to let it pay for.

As I know I can start each machine as my company user and create an image.

I wonder if there is a way to simple copy these machines?

like image 450
Dmitry Kuzmenko Avatar asked Nov 30 '11 09:11

Dmitry Kuzmenko


2 Answers

You can copy an EBS boot AMI from one EC2 account to another using the technique I wrote about here:

Copying EBS Boot AMIs Between EC2 Regions
http://alestic.com/2010/10/ec2-ami-copy

The commands I list are for copying an EBS boot AMI from one region to another, but if you simply use the right commands with different accounts instead of different regions, you can accomplish your goal. Note that you'll have to upload your personal ssh key to both accounts following these instructions:

Uploading Personal ssh Keys to Amazon EC2
http://alestic.com/2010/10/ec2-ssh-keys

Copying S3 based AMIs from one account to another is a bit convoluted and involves commands like:

  • ec2-download-bundle
  • ec2-unbundle
  • (switch accounts)
  • ec2-bundle-vol
  • ec2-upload-bundle
  • ec2-register

Alternatively, you hopefully documented the exact steps you took to create the original AMIs. Simply follow these instructions to create the AMIs in the new account.

like image 94
Eric Hammond Avatar answered Sep 24 '22 07:09

Eric Hammond


You can also share the AMIs with your other account. Then launch instances on the new account and create AMIs that will then be associated with the new account.

like image 32
imperalix Avatar answered Sep 24 '22 07:09

imperalix