Skip to content

How do I create an Amazon EC2 instance AMI in one Region and then copy it to another Region?

3 minute read
0

I want to launch a copy of my Amazon Elastic Cloud Compute (Amazon EC2) instance to serve clients in other AWS Regions and create redundancy in my application.

Resolution

Create a copy of your AMI in another Region

Note: When you create an Amazon Machine Image (AMI), the instance automatically reboots to maintain data consistency. The public IP address also remains the same. To avoid an instance reboot, choose the NoReboot option when you create the AMI.

Complete the following steps:

  1. Use one of the following methods to create an AMI of your EC2 instance:
    For an Amazon Elastic Block Store (Amazon EBS)-backed Linux AMI, see Create an AMI from an instance.
    For an instance store-backed Linux AMI, see Create an instance store-backed AMI.
    For a Windows AMI, see Create an Amazon EC2 AMI using Windows Sysprep.
  2. Copy your instance AMI to another Region.
  3. Launch a new EC2 instance from your AMI in the new Region.

Note: Instances that you create from AMIs don't retain or copy data that's stored in instance store volumes. The source instance that you create the AMI from retains all data that's stored in the instance store.

For information about encryption support for AMIs, see Encryption and copying.

Share an AMI with specific accounts

To share an AMI with other AWS accounts, see Share an AMI with specific AWS accounts.

To share an encrypted AMI, see How to share encrypted AMIs across accounts to launch encrypted EC2 instances.

Resolve the "AMI was copied from an AMI with a kernel that's unavailable in the destination region" error

Because not all Regions support Linux paravirtual (PV) AMIs, you might receive the following error message when you copy your EC2 Linux instance AMI:

"This AMI was copied from an AMI with a kernel that is unavailable in the destination region: {Image ID}"

To resolve the issue, complete the following steps:

  1. Create a new hardware virtual machine (HVM) instance.
  2. Attach the new EBS volumes to the HVM instance.
  3. Transfer the data from the EBS volumes that are attached to the old PV instance to the HVM instance.

For more information, see Virtualization types.

Related information

Best practices for Amazon EC2

How can I share an encrypted EBS snapshot or volume with another AWS account?

Amazon PV-GRUB kernel image IDs

AWS OFFICIALUpdated 8 months ago