How to Copy, Move or Share Amazon EC2 Instance to another Amazon Account? - 1

Amazon EC2 instance

  1. Login into AWS Management Console . Click on Services and then click on EC2
  2. Click on Running instances and then Right-click on Amazon EC2 instance and then click Image > Create image
  3. Define the image name and image description and then click on Create Image to generate the AMI. Additional you can select No reboot . When enabled, Amazon EC2 does not shut down the instance before creating the image. When this option is used, file system integrity on the created image cannot be guaranteed.
  4. Create an Image request received. It will take a few minutes until it is created and available. Click on View pending image ami-xxxxxxxxx .

You can access an AMI also by clicking on Images > AMIs on the left side of the window.

How to Copy, Move or Share Amazon EC2 Instance to another Amazon Account? - 2
  1. Once it is available, right-click on the AMI image and then click Modify Image Permissions.
  2. Under Modify Image Permissions choose he image type ( public or private ), type the AWS Account Number, and then select Add “create volume” permissions to the following associated snapshots when creating permissions. In our case, we will choose a private image.

The AWS Account Number (known as Account ID) can be found if you click on your profile at the top right side and then click on My Account .

How to Copy, Move or Share Amazon EC2 Instance to another Amazon Account? - 3
  1. Click on Add Permission and then click on Save . Your AMI image is successfully shared with another AWS account.

You will get an email with confirmation from AWS that your validation was successful.

Export Public Key from Existing Key Pair

  1. Open an Internet browser and download PUTTY from this link .

  2. Click on Start and search for PuTTYGen and run it.

  3. Click on Load . Add your private key pair (*.pem). As you can see, the key is successfully imported. Please click on OK and copy the key from the field Public key for pasting into OpenSSH authorized_keys file . We will need this key in step 2.

  4. Login into AWS Management Console

  5. Click on Services and then open EC2 . Then click on Key pairs

  6. Click on Actions and then Import key pair

  7. Enter the key pair name and add the public key you copied in the previous step.

  8. Click on Import key pair and then click on IMAGES > AMI on the left side of the window

  9. Choose the Private images to access the shared AMI image

  10. Right-click on the AMI Image and click on Launch

  11. Choose an Instance Type and click Next: Configure Instance Details . We should choose the same instance type as in the source AWS account. In our case, we will choose t2.micro (Variable ECUs, 1 vCPUs, 2.5 GHz, Intel Xeon Family, 1 GiB memory, EBS only)

  12. Configure Instance Details to suit your requirements and then click Review and Launch . We do recommend enabling termination protection. You can protect instances from being accidentally terminated. Once enabled, you won’t be able to terminate this instance via the API or the AWS Management Console until termination protection has been disabled.

  13. Please review your instance launch details and click Launch . You can go back to edit changes for each section.

  14. Select the imported key pair by clicking on Choose an existing key pair and selecting the key pair.

  15. Select I acknowledge that I have access to the selected private key file (KeyPair.pem) and that without this file, I won’t be able to log into my instance and click Launch Instances .

  16. Your instances are now launching. Click on View launches .

  17. Please wait a few minutes until your instance is successfully initialized.

  18. Right-click on the image and then choose Connect

How to Fix “Printer is in an error state” Issue?