All Products
Search
Document Center

Elastic Compute Service:Update a custom image

Last Updated:Feb 28, 2026

Rebuild a custom image with the latest software and configurations. CloudOps Orchestration Service (OOS) automates the entire update process -- from launching a temporary instance to capturing the new image and cleaning up resources.

How it works

OOS provides the ACS-ECS-UpdateImage public template that automates custom image updates. Specify a source image, an instance type, and a Cloud Assistant script, and OOS handles the rest.

The template runs the following steps in sequence:

  1. Check the image name. Verify that the new image name is unique and meets naming conventions.

  2. Prepare resources. Create a temporary ECS instance from the source image using the specified instance type and security groups. Install Cloud Assistant Agent on the instance.

  3. Update the environment. Run a custom shell, Python, Perl, batch, or PowerShell script through Cloud Assistant to update the application environment on the temporary instance.

  4. Create a custom image. Stop the temporary instance and create a new custom image from it.

  5. Release resources. Release the temporary instance to avoid unnecessary costs.

Important

The update process automatically creates a temporary pay-as-you-go ECS instance. Make sure that your account balance covers the cost of temporary resources. The instance is released after the new image is created.

Prerequisites

Before you begin, make sure that you have:

  • A custom image to update

  • Enough account balance for a temporary pay-as-you-go ECS instance

  • Permissions to call ECS API operations for creating custom images

  • A virtual private cloud (VPC), vSwitch, and security group for the temporary instance. You can also create these resources on the task creation page.

  • (Optional) A shell, Python, Perl, batch, or PowerShell script to customize the environment

Procedure

  1. Go to ECS console - Images.

  2. In the top navigation bar, select the region and resource group of the resource that you want to manage. Region

  3. On the Images page, click the Custom Images tab.

  4. Find the image to update. In the Actions column, choose More > Update Image. The OOS console opens with the Create Task Create or Update Images page.

  5. In the General Settings section, configure the following parameters:

    ParameterDescriptionExample
    New Image NameA unique name for the new custom image.image-20230713133609
    PermissionsThe permissions for the update task. Options: Use Existing Permissions of Current Account (default) -- uses your current account permissions. Requires permissions to call ECS API operations for image creation. Specify RAM Role and Use Permissions Granted to This Role -- OOS assumes a Resource Access Management (RAM) role to perform O&M tasks.Use Existing Permissions of Current Account
  6. In the Select Image section, verify the source image. The source image is automatically selected. Confirm that this is the custom image you want to update.

  7. In the Configure Immediate Instance section, configure the temporary ECS instance:

    ParameterDescriptionExample
    VPCThe ID of the VPC for the temporary instance.vpc-bp1pfyqnwdnvj7b\*\*\*\*\*\*
    vSwitchThe ID of the vSwitch for the temporary instance. The vSwitch and security group must belong to the same VPC.vsw-bp1s5fnvk4gn2tw\*\*\*\*\*\*
    Security GroupThe ID of the security group for the temporary instance.sg-bp1azkttqpldxg\*\*\*\*\*\*
    Instance TypeThe instance type of the temporary instance. For more information, see Overview of instance families.ecs.g6.xlarge
    System Disk TypeThe disk category for the temporary instance.cloud_essd
    Public BandwidthThe public bandwidth of the temporary instance.0
  8. (Optional) In the Send Remote Commands section, select a command type and enter the command content. The command runs on the temporary ECS instance to update the application environment.

  9. (Optional) In the Image Distribution section, configure image copying or sharing.

    • To copy the new image to other regions, enter destination regions.

    • To share the new image with other Alibaba Cloud accounts, enter their account IDs.

  10. (Optional) In the Scaling Group Configuration section, configure scaling group settings.

  11. (Optional) In the Execution Settings(Optional) section, configure Description, Tags for Execution, Executed Resource Group, or Save as Template based on your requirements.

  12. Click Create. In the Parameter Confirmation dialog, review the settings and click OK.

Verify the result

After you click OK, the execution enters the Running state while the image is being updated.

  1. Monitor the execution status until Execution Status changes to Success.

    Note

    To view real-time progress and logs, click Details in the Actions column for the execution, and then click the Log tab.

  2. (Optional) Find the new image:

    1. On the execution details page, check the output section for the new image ID. image.png

    2. On the Custom Images tab of the Images page in the ECS console, search for the new image by its ID.