AWS AMI cross-region replication and sharing

Published: (December 14, 2025 at 08:22 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Overview

AWS AMI cross‑region replication and sharing can be performed via the AWS Management Console, CLI, or SDK. AMIs are region‑specific, so they must be copied explicitly to another region before they can be shared.

Copy an AMI to another region

  1. Open the EC2 console.
  2. Navigate to AMIs > My AMIs.
  3. Select the source AMI and choose Actions > Copy AMI.
  4. Specify:
    • Destination region
    • Name and description
    • Encryption options (e.g., select a KMS key for encrypted snapshots)
  5. AWS creates a new AMI ID in the target region. Monitor progress in the console or with the CLI.

CLI example

aws ec2 copy-image \
    --source-region us-east-1 \
    --source-image-id ami-12345678 \
    --name "CopiedAMI" \
    --region us-west-2

Costs: Snapshot storage and minor data‑transfer fees apply; there is no extra copy fee.

Share the copied AMI with other AWS accounts

  1. In the EC2 console of the target region, select the newly copied AMI.
  2. Choose Actions > Modify Image Permissions.
  3. Add the recipient’s 12‑digit AWS account ID under Launch Permissions > Specific AWS accounts.
  4. Save changes. The recipient will see the AMI under AMIs > Shared with me.

CLI example

aws ec2 modify-image-attribute \
    --image-id ami-87654321 \
    --launch-permission "Add=[{UserId=123456789012}]"

Revoke sharing permissions

Use the same command with Remove instead of Add:

aws ec2 modify-image-attribute \
    --image-id ami-87654321 \
    --launch-permission "Remove=[{UserId=123456789012}]"

Encrypted AMIs

When sharing encrypted AMIs, you must also share the associated KMS key with the recipient account.

Usage by the recipient

The recipient can launch instances from the shared AMI in the target region (e.g., us-west-2). They are responsible for any usage fees incurred.

Back to Blog

Related posts

Read more »

How To Create An EC2 Instance in AWS.

!Cover image for How To Create An EC2 Instance in AWS.https://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2...

Creating an EC2 Instance

Steps 1. Search bar, type EC2 and choose the first option. 2. Click Launch Instance. 3. In the Launch Instance Environment, enter a name in the name bar and cl...