All Products
Search
Document Center

Elastic Compute Service:Update a custom image

Last Updated:May 15, 2026

Use CloudOps Orchestration Service (OOS) to apply the latest software and configurations to a custom image.

Background

OOS provides the ACS-ECS-UpdateImage public template to update custom images. Specify a source image, an instance type, and a Cloud Assistant script. OOS then automatically creates an execution that updates the image and generates a new one.

Important

The update process automatically creates a temporary pay-as-you-go ECS instance. Ensure that your account balance can cover the temporary resources.

The ACS-ECS-UpdateImage template performs the following tasks 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 with the specified instance type and security groups, and install Cloud Assistant Agent.

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

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

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

Procedure

  1. Go to ECS console - Images.

  2. In the upper-left corner of the page, select a region and resource group.地域

  3. On the Image page, click Custom Images.

  4. Find the image to update. In the Actions column, choose 更多操作 > Update Image.

  5. On the OOS console Create or Update Images page, configure the following settings:

    1. In the General Settings section, configure the following parameters.

      Parameter

      Description

      Example

      New Image Name

      The new image name. Must be unique.

      image-20230713133609

      Permissions

      • Use Existing Permissions of Current Account: Default. Ensure your account has permissions to call ECS API operations for creating custom images.

      • Specify RAM Role and Use Permissions Granted to This Role: OOS assumes the specified RAM role to perform O&M tasks.

      Use Existing Permissions of Current Account

    2. In the Select Image section, verify that the source image is the custom image you want to update.

      The source image is selected by default.

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

      Set the following parameters for the temporary instance.

      Parameter

      Description

      Example

      VPC

      The VPC in which to deploy the temporary instance.

      vpc-bp1pfyqnwdnvj7b******

      vSwitch

      The vSwitch for the temporary instance. Must be in the same VPC as the security group.

      vsw-bp1s5fnvk4gn2tw******

      Security Group

      The security group for the temporary instance.

      sg-bp1azkttqpldxg******

      Instance Type

      The instance type of the temporary instance. See Instance family.

      ecs.g6.xlarge

      System Disk Category

      The system disk category of the temporary instance.

      cloud_essd

      Public Bandwidth

      The public bandwidth of the temporary instance.

      0

    4. (Optional) In the Send Remote Commands section, select a command type and enter the command content to run on the temporary instance.

    5. (Optional) In the Image Distribution section, specify destination regions to copy the image or Alibaba Cloud account IDs to share the image.

    6. (Optional) Configure parameters in the Scaling Group Configuration section.

    7. (Optional) In the Execution Settings section, configure Description, Tags for Execution, or Save as Template as needed.

  6. Click Creation, confirm the parameters, and click OK.

    When the execution enters the Running state, the image update is in progress. The image is updated when the status changes to Successful.

    Note

    To view update progress, click Actions in the Actions column and click Log.

  7. (Optional) View the new image.

    1. On the execution details page, find the new image ID in the output section.

      image.png

    2. On the Custom Images tab in the ECS console, find the new image by ID.