When deploying consistent workloads across multiple regions, you can copy a custom image from the source region to destination regions. This enables you to use the same image to launch Elastic Compute Service (ECS) instances in different regions without recreating the image manually.
Copy methods
The copy method depends on your use case:
Method | Description | Use case |
Cross-region copy | Copy an image from one region to another within your account | Deploy consistent instances across regions for disaster recovery or global expansion |
Cross-region copy with encryption | Copy an image and encrypt the copy in the destination region | Meet security compliance requirements while distributing images across regions |
Cross-account copy | Share an image to another account, then copy it within that account | Distribute images to partner organizations or subsidiary accounts |
To copy an image within the same region, you must use the Copy and Encrypt method. Standard cross-region copying is not available for in-region copies.
Considerations
Before you copy a custom image, note the following:
Billing: When you copy an image, snapshots are created in the destination region. You are charged for the snapshots. For more information, see Snapshot billing.
Duration: The copy duration depends on the image size, network conditions, and the number of concurrent copy tasks in the queue. Large images may take several hours to copy.
Large images: For images larger than 2 TiB, copy the snapshots to the destination region first, then create an image from the snapshot copies.
Prerequisites
Before you begin, ensure that you have:
A custom image in the source region. For more information, see Create a custom image from an instance or Create a custom image from a snapshot.
(For encryption) An encryption key in the destination region. For more information, see Activate Key Management Service.
Copy an image
Log on to the ECS console.
In the top navigation bar, select the source region.
On the Custom Images tab, find the image that you want to copy.
In the Actions column, click Copy Image.
In the Copy Image dialog box, configure the following parameters:
Parameter
Required
Description
Copy Mode
Yes
Select a copy mode:
Copy: Create a copy of the image in another region. Use this mode for cross-region deployment or backup.
Copy and Encrypt: Create an encrypted copy of the image. Use this mode when you need to encrypt the image or copy within the same region. This operation is time-consuming.
Destination Region
Yes
Select the region where you want to store the image copy.
Custom Image Name
Yes
Enter a name for the image copy. The name must be 2 to 128 characters in length.
Description
No
Enter a description for the image copy.
Resource Group
No
Select a resource group for the image copy.
Tag
No
Add tags to the image copy for easier management.
Compliance Warranty
Yes
Read and agree to the compliance warranty. You must select this checkbox to proceed.
Verify the result.
In the top navigation bar, select the destination region.
On the Custom Images tab, find the new image copy.
Check the Status column:
Creating: The copy operation is in progress.
Available: The copy operation completed successfully.
NoteFor large images, the copy operation may take several hours. You can leave the page and return later to check the status.
Cancel a copy operation
To stop a pending copy operation:
Find the image with Creating status.
In the Actions column, click Cancel Copying.
Apply in production
Reduce copy duration
Copy images during off-peak hours to reduce queue wait time
For images larger than 2 TiB, copy snapshots separately and create images from the copies
Avoid copying multiple large images simultaneously
Optimize costs
Delete unused image copies promptly
Use the standard Copy mode unless encryption is required
Monitor snapshot storage costs in destination regions
Troubleshooting
Issue | Possible cause | Solution |
Copy operation takes too long | Large image size or high queue volume | Wait for the operation to complete, or cancel and retry during off-peak hours |
Copy fails with permission error | Insufficient RAM permissions | Grant the |
Image copy not visible | Wrong region selected | Select the destination region in the top navigation bar |
Copy fails for shared image | Shared images have regional restrictions | Create a custom image from the shared image first, then copy the custom image |
API reference
To copy images programmatically, use the CopyImage API operation.
aliyun ecs CopyImage \
--RegionId ap-southeast-1 \
--ImageId m-bp1xxxxxxxxxxxxx \
--DestinationRegionId ap-northeast-1 \
--DestinationImageName my-image-copy