All Products
Search
Document Center

Elastic Compute Service:Deprecate or restore an image

Last Updated:Apr 01, 2026

Use image deprecation to roll back an image family to an earlier version when the latest custom image is defective. To make a deprecated custom image usable again, restore it.

Prerequisites

Before you begin, ensure that you have:

The examples in this topic use an image family named image-test that contains two images: image1 and image2. image2 is the latest available custom image.

Limitations

  • A shared custom image must be unshared before it can be deprecated.

  • Deprecated custom images can still be used to create instances or replace system disks, but cannot be shared or copied.

After an image is deprecated

When an image is deprecated in an image family:

  • New instances created from the image family use the next latest available custom image instead.

  • The deprecated image remains usable — it can still be used to create instances or replace system disks.

  • The deprecated image cannot be shared or copied.

Important

If the deprecated image is the only available image in the family, no image is available for creating new instances from that family. Proceed with caution.

Deprecate an image

  1. Go to ECS console - Images.

  2. In the top navigation bar, select the region and resource group of the resource. 地域

  3. Deprecate the latest custom image image2 in the image-test image family.

    1. (Optional) In the upper-right corner of the custom image list, turn on the image.png switch.

    2. In the Image Family section, click image-test.

    3. Find image2 and choose 更多操作 > Deprecate Image in the Actions column.

    4. Confirm the image to deprecate and click Confirm.

    5. Verify that Deprecated appears in the Status column for image2.

  4. Log on to OpenAPI Explorer.

  5. Call DescribeImageFromFamily to verify the latest available image in the family. Set the following parameters:

    • RegionId: The region ID of the image family.

    • ImageFamily: The image family name — for example, image-test.

    The response shows image1 as the latest available image, confirming that image2 is deprecated. if1

Restore an image

  1. Go to ECS console - Images.

  2. In the top navigation bar, select the region and resource group of the resource. 地域

  3. Restore the deprecated image image2 in the image-test image family.

    1. (Optional) In the upper-right corner of the custom image list, turn on the image.png switch.

    2. In the Image Family section, click image-test.

    3. Find image2 in the Deprecated state and choose 更多操作 > Restore Image in the Actions column.

    4. Confirm the image to restore and click Confirm.

    5. Verify that Available appears in the Status column for image2.

  4. Log on to OpenAPI Explorer.

  5. Call DescribeImageFromFamily to verify the latest available image in the family. Set the following parameters:

    • RegionId: The region ID of the image family.

    • ImageFamily: The image family name — for example, image-test.

    The response shows image2 as the latest available image, confirming the restore was successful. image2

What's next

After an image is restored, use it to create ECS instances via the RunInstances or CreateInstance API operations.