You can copy images to deploy Elastic Compute Service (ECS) instances across regions or change the encryption states of encrypted and unencrypted images within the same region or across regions. After an image is copied to a destination region, you can obtain the image copy with a different ID in the region. The configurations such as tags, resource groups, and encryption attributes of the image copy are defined when you copy the original image.
Prerequisites
- A custom image is created. For more information, see Create a custom image from a snapshot or Create a custom image from an instance.
- Key Management Service (KMS) is activated before you copy an image to create an encrypted image copy. For more information, see Activate KMS.
Background information
Use scenarios
- Copy scenarios
Scenario Description Procedure Deploy ECS instances across regions within the same account After an image is copied to a destination region, you can obtain the image copy with a different ID in the region. Configurations such as tags, resource groups, and encryption attributes of the image copy are defined when you copy the original image. Then, you can use the image copy to deploy ECS instances. - Set Copy Mode to Copy and select a destination region. You can follow the steps described in this topic.
- Create an ECS instance by using a custom image
Deploy ECS instances across regions and accounts After an image is copied to a destination region, you can share the image copy to other Alibaba Cloud accounts. Then, the accounts can use the image copy to deploy ECS instances. - Set Copy Mode to Copy and select a destination region. You can follow the steps described in this topic.
- Share an image
- Create an ECS instance by using a custom image
Deploy ECS instances across accounts within the same region You can share an image to other Alibaba Cloud accounts. Then, those accounts can use the image to deploy ECS instances. - Copy and encryption scenarios
Scenario Description Procedure Change the encryption state of a custom image- Copy an encrypted image to create an encrypted image with a different encryption key
- Copy an unencrypted image to create an encrypted image
After you copy an image within a region or across regions, you can use the encrypted image copy to deploy ECS instances. Note After a custom image is encrypted, the system and data disks of an instance that is created from the image are automatically encrypted. The system and data disks use the same encryption key as the custom image.- Set Copy Mode to Copy and Encrypt, select a destination region, and then select an encryption key. The destination region can be the region of the original image or a different region.
- Create an ECS instance by using a custom image
Usage notes
- Replication fees
- Snapshot fees: When you copy an image to a region, a corresponding snapshot is automatically
created in that region and consumes snapshot storage capacity. You are charged for
the amount of snapshot storage capacity that you actually use. For more information,
see Snapshots.
Note Snapshots created for image copies are retained indefinitely regardless of how long the snapshots of original images are retained.
- Fees for cross-region data transfer: Alibaba Cloud does not charge you for cross-region traffic. For information about the latest billing details, see the official Alibaba Cloud website for announcements.
- Snapshot fees: When you copy an image to a region, a corresponding snapshot is automatically
created in that region and consumes snapshot storage capacity. You are charged for
the amount of snapshot storage capacity that you actually use. For more information,
see Snapshots.
- Replication durationThe amount of time it takes to copy an image depends on the size of the image, the network transmission speed, and the number of concurrent tasks in the queue.Note It is much faster to copy a snapshot than an image, and snapshot copying can be used to bypass capacity constraints. To copy a large image such as an image larger than 2 TiB in size across regions, you can first copy the associated snapshots to the destination region and then create an image from these snapshots in the destination region. For more information, see Copy a snapshot and Create a custom image from a snapshot.
- Image copy configurations
Image copies do not inherit feature configurations from the original images such as authorized roles, authorized services, and instance user data. Grant permissions to image copies based on your needs.