15

Is there a way to give an entire EC2 instance to a different party. Basically I was managing a EC2 Server for a client and am now giving up maintenance of the server. I don't want to be billed for this instance anymore. Instead of backing up our application and configuring a new server under the clients account I would prefer to just give them the whole instance that is preconfigured to save time. Is this possible.

2 Answers 2

15

You cannot transfer an EC2 instance (or any other resources) to a different AWS account.

If the instance is EBS boot (recommended), you might try an approach like this:

  1. Stop the current instance (ec2-stop-instances)

  2. Create an AMI from the instance (ec2-register-image)

  3. Give the second AWS account permission to run that AMI (ec2-modify-image-attribute)

  4. Run a new instance of the AMI under the second AWS account (ec2-run-instances)

DNS would need to be updated to point to the IP address of the new instance (preferably using an Elastic IP Address). Any other AWS/EC2 resources would also need to be copied/recreated in the second account.

After sufficient testing, you might want to free up the original instance (ec2-terminate-instances).

The second account should create their own snapshots / AMIs of the instance to protect themselves if their instance/EBS volume fails after the AMI owned by you is deleted.

Even better, you should have documented/scripted exactly how your instance was created so that the client can reproduce this at will.

1
  • The process is documented. I just didn't want to have to walk through all of the installs and the kernel changes I had to make on another machine. Just trying to save time.
    – cjibo
    Oct 20, 2011 at 4:39
-1

The solution will work if you are sharing an AMI in the same region. If not, you need to copy the AMI to the target region first.

I wrote a blog explaining all these steps in detail at https://medium.com/@gmusumeci/how-to-move-an-ec2-instance-to-another-aws-account-e5a8f04cef21

Guillermo

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .