This topic describes how to share or unshare custom images. After you create a custom image, you can share it with other Alibaba Cloud accounts. The Alibaba Cloud accounts can create ECS instances from the shared image. You can also unshare custom images from Alibaba Cloud accounts to which they were shared.

Prerequisites

Before you share an image, ensure that all sensitive data and files have been removed from the image.

Background information

Images shared to an account are not counted against the image quota assigned to the account. Alibaba Cloud does not charge an account for images shared to it.

Only users who create an ECS instance from the shared custom image are charged. For more information about the billing of shared images, see Images.

Users can only use the shared image and cannot delete it directly. If you want to delete the shared image, you must first unshare and then delete it. For more information, see Delete custom images.

Before you share a custom image with an Alibaba Cloud account, note the following limitations:
  • You can share only the custom images created under your account. You cannot share custom images that were created and shared by other accounts.
  • Each custom image can be shared with up to 50 accounts.
  • You can share images between the accounts on the China (aliyun.com), International (alibabacloud.com), and Japan (jp.alibabacloud.com) sites. However, the custom images that were created from Alibaba Cloud Marketplace images cannot be shared.
  • Custom images cannot be shared across regions. If you want to share a custom image across regions, you must copy the image to the target region first. For more information, see Copy custom images.
  • ECS cannot guarantee the integrity and security of shared images. Before you use the shared images, ensure that the images are from trusted users or accounts. You must assume all risks.

Share custom images

You can perform the following steps to share your custom image with an Alibaba Cloud account.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Images.
  3. In the top navigation bar, select a region.
  4. On the Custom Images tab, select the custom image that you want to share. Choose More > Share Image in the Actions column.
  5. In the Share Image dialog box that appears, select Alibaba Cloud Account ID from the Account Type drop-down list, enter the account ID with which you want to share images in the Account field, and click Share Image.

    How to obtain the account ID: Move the pointer over the profile picture in the upper-right corner of the Alibaba Cloud console. Select Security Settings from the drop-down list. The account ID is displayed on the Security Settings page.

    After you share a custom image with an account, the account can view the shared image from the ECS console by choosing Instances & Images > Images > Shared Images in the same region. The account that receives the shared image can perform the following operations:

Unshare custom images

You can perform the following steps to unshare your custom image from an Alibaba Cloud account.
Notice After you unshare the custom images:
  • The account that received the shared image cannot query the image from the ECS console or by calling the API operation.
  • The account that received the shared image cannot create ECS instances or replace the system disk by using the image.
  • The system disks of ECS instances that were created from the shared image cannot be reinitialized.
  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Instances & Images > Images.
  3. In the top navigation bar, select a region.
  4. On the Custom Images tab, select the custom image that you want to unshare. Choose More > Share Image in the Actions column.
  5. In the Share Image dialog box that appears, select the account ID and click Unshare.
    Unshare images