This topic provides answers to some frequently asked questions (FAQ) about the relationships between Elastic Compute Service (ECS) images and snapshots, and the relationships between images and instances.

Is the lifecycle of an image the same as that of its associated ECS instance?

The lifecycle of an image is the same as that of its associated ECS instance. When you create an instance, you must select an image. The image uses the same billing method as the instance. The billing method can be subscription or pay-as-you-go.

What are the relationships and differences between images and snapshots?

Snapshots and images have the following relationships:
  • When you create a custom image from an instance, ECS creates a snapshot for each disk (system disk and data disks) of the instance. The created custom image consists of the snapshots of all disks of the instance. For more information, see Create a custom image from an instance.
  • When you delete a custom image, you can determine whether to delete the corresponding snapshot. When you delete a snapshot, the system checks whether the snapshot is associated with an image. If the snapshot is associated with the an image, the snapshot cannot be deleted before the image is deleted. For more information, see Delete a custom image and Delete a snapshot.
  • You can use a system disk snapshot to create a custom image. For more information, see Create a custom image from a snapshot.
Snapshots and images have the differences described in the following table.
ItemImageSnapshot
NatureImages provide operating systems, initialization data of applications, and pre-installed software for ECS instances. A snapshot is a point-in-time backup of a disk.
Use scenario
  • Deploy environments in a quick manner. You can use an image to create an ECS instance that hosts a specific environment.
  • Batch deploy environments. You can create a custom image from an instance on which an environment is deployed or create a custom image from disk snapshots. Then, you can use the custom image to batch create instances that have identical environments.
  • Replace operating systems. You can use an image to replace the operating system (system disk) of an ECS instance.
  • Back up disk data on a regular basis. You can use automatic snapshot policies to automatically create snapshots to back up data on a daily, weekly, or monthly basis.
  • Back up disk data temporarily. Before you perform critical operations such as updating operating systems or resizing disks, you can create snapshots to back up disk data.
Feature
  • Images can be used to create ECS instances, whereas snapshots cannot.
  • An image can contain data of only the system disk of an instance or data of the system disk and data disks of an instance.
  • An image can be used to replace the operating system (system disk) of its associated instance or other instances, or can be used to create instances.
  • Images can be copied, shared across regions or accounts to create instances that have identical environments.
  • Snapshots can back up data on system disks and data disks of instances.
  • Snapshots can be used to restore data on disks of existing instances.
  • Snapshots can be copied to back up disk data across regions.

What happens to a custom image when the instance from which the image was created is released?

After an instance is manually released or is automatically released when it expires, the custom images created from the instance and the instances created from the custom images are not affected.

If an image was manually created from an ECS instance, can I retrieve instance data after the instance is released on expiration?

Yes, you can retrieve instance data by using one of the following methods:
Important
  • The image must be in the same region as the existing instance.
  • Maintain a sufficient balance in your account balance to prevent data from being released due to snapshot deletion 15 days after the instance expires or after a payment becomes overdue for the instance. For more information, see Snapshots.

Can a custom image created from a subscription instance be used to create a pay-as-you-go instance?

Yes, a custom image created from a subscription instance can be used to create a pay-as-you-go instance. The use of custom images has nothing to do with the billing methods of instances.