Custom images can be put into the Deprecated state or be restored. You can set the state of an available custom image in an image family to Deprecated to roll back the image. You can also restore the latest custom image in the image family.
Prerequisites
Two custom images are available in the same image family. For more information, see
Set an image family. In this example, the image family is named image-test
and contains two images: image1
and image2
. image2
is the latest available custom image.
Background information
The state of a custom image can be changed regardless of whether the custom image
belongs to an image family. The state of a custom image can be changed from Available
to Deprecated, and an image in the Deprecated state can be restored to the Available
state. Operations vary based on the states of images:
- A custom image that has been shared must be unshared before the image can be put into the Deprecated state.
- Custom images in the Deprecated state can be used to create instances or replace system disks, but cannot be shared or copied.
- You can set the state of the latest available custom image in an image family to Deprecated
to roll back the image. When you use the image family to create Elastic Compute Service
(ECS) instances, the latest available custom image that is not in the Deprecated state
is used. Custom images in the Deprecated state are not used.
Important If you want to roll back a custom image in the image family to a previous version, you can put the latest available custom image into the Deprecated state. However, if the custom image that you want to roll back is the only image in the Available state within the image family, the image family does not contain available custom images that can be used to create instances after you put the custom image into the Deprecated state. Proceed with caution when you put a custom image into the Deprecated state.
- If you want to use the latest custom image that is in the Deprecated state in an image family, you can restore the image and use the image as the latest available custom image.