Create an image acceleration task to improve the scaling efficiency of your scaling group

Updated at:
Copy as MD

During scaling events, images with performance issues can slow ECS instance startup, reducing the scaling efficiency of your scaling group. The image acceleration feature optimizes image performance to speed up instance startup and improve scaling efficiency.

How it works

You can replace the original image in your scaling configuration or launch template with the accelerated image. This enables your scaling group to launch instances faster and significantly improves its scaling efficiency.

Important

Running an image acceleration task creates multiple intermediate instances to build the image. These are pay-as-you-go ECS instances and will incur charges. For more information, see Pay-as-you-go.

Prerequisites

In addition to Auto Scaling permissions, RAM users require the following permissions for the image building service to use this feature.

This example includes all Auto Scaling operation permissions (ess:*). Adjust the policy as needed.
{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "ess:*",
      "Resource": "*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "ecs:CreateImagePipeline",
        "ecs:StartImagePipelineExecution",
        "ecs:DescribeImagePipelineExecutions"
      ],
      "Resource": "*"
    }
  ]
}

Procedure

Step 1: Create an image acceleration task

  1. Navigate to the image acceleration tasks page for the target scaling group.

    1. Log on to the Auto Scaling console.

    2. In the left-side navigation pane, click Scaling Groups.

    3. In the top navigation bar, select the region where Auto Scaling is activated.

    4. On the Scaling Groups page, find the scaling group that you want to accelerate, click View Details in the Actions column to go to the details page of the scaling group, and then click the Scaling Configuration > Image Acceleration Tasks tab to go to the Image Acceleration Tasks page.

  2. Start the image acceleration task.

    Click Accelerate Image. In the dialog box that appears, select the Scaling Configuration (or Launch Template) that contains the image to accelerate, and then click OK. You can monitor the task's status in the Status column.

    Important

    Running an image acceleration task creates multiple intermediate instances to build the image. These are pay-as-you-go ECS instances and will incur charges. For more information, see Pay-as-you-go.

Step 2: Verify the accelerated image

When an image acceleration task is complete, a new custom image is created. You can use the new, accelerated image to create an instance to verify that the image works as expected. This prevents you from using an incorrect image to start instances in a scaling group. For instructions on how to create an instance from an image, see Create an instance from a custom image or a shared image.

Step 3: Apply the accelerated image

After confirming the image works as expected, click Update in the Actions column of the corresponding image acceleration task to apply the accelerated image to the scaling configuration.

Next steps

To apply the new image to existing instances in your scaling group, use the instance refresh feature. For more information, see Instance Refresh.