A scaling group is a group of Elastic Compute Service (ECS) instances that can be dynamically scaled based on the preconfigured rule. A scaling configuration is a template that is used by a scaling group to create ECS instances. To enable automatic scaling, you must first create both a scaling group and a scaling configuration. This topic describes how to create a scaling group, create a scaling configuration for the scaling group, and enable the scaling group. The minimum number of ECS instances in a scaling group is one.

Prerequisites

Before you proceed, make sure that the following operations are performed:

Background information

After a scaling group is created, the region of the scaling group cannot be changed. For more information, see Regions and zones.

Step 1: Create a scaling group

In this example, a scaling group is created with simple settings. For more information about parameters, see Create a scaling group.

  1. Log on to the Auto Scaling console.
  2. In the left-side navigation pane, click Scaling Groups.
    In this example, the operations are performed on the Scaling Groups page. If you do not have scaling resources in the current region, the welcome page is displayed after you log on to the console. To create scaling resources, follow the on-screen instructions.
  3. In the top navigation bar, select a region.
  4. In the upper-left corner of the Scaling Groups page, click Create.
  5. Configure parameters for the scaling group and click OK.
    The following table describes the parameters that are used in this example. For information about the parameters that are not described in the following table, use the default values.
    Parameter Example value Description
    Scaling Group Name MyFirstScalingGroup None
    Instance Configuration Source Create from Scratch If you create a scaling group from scratch, the scaling group that you created does not have an instance configuration source. You must create a scaling configuration for the scaling group.
    Tag ESS:Documentation Tags are used to categorize the scaling groups for easy management.
    Minimum Number of Instances 1 A scaling group must contain at least one ECS instance. If the number of ECS instances in the scaling group is less than one, an instance is automatically created for the scaling group.
    Maximum Number of Instances 3 A maximum of three ECS instances can be created in a scaling group. If the number of ECS instances is greater than three, the extra ECS instances are automatically removed from the scaling group.
    Network Type Classic Network When you create a scaling configuration, you can select only instance types that support the classic network.
  6. In the Create Scaling Group dialog box, click OK.

Step 2: Create a scaling configuration and enable the scaling group

In this example, a scaling configuration is created with simple settings. For more information about parameters, see Create a scaling configuration.

  1. Find a scaling group and go to the details page of the scaling group. You can use one of the following methods to go to the details page:
    • Click the ID of the scaling group in the Scaling Group Name/ID column.
    • Click Details in the Actions column of the scaling group.
  2. In the upper part of the page, click the Instance Configuration Sources tab.
  3. In the upper-left corner of the page, click the Scaling Configurations tab.
  4. Click Create Scaling Configuration.
  5. Follow the on-screen instructions to create the scaling configuration and click OK.
    The following table describes the parameters that are used in this example. For information about the parameters that are not described in the following table, use the default values.
    Step Parameter Example value Description
    Basic Configurations Billing Method Pay-As-You-Go Auto Scaling is free of charge. However, you must pay for the ECS instances that are added to the scaling group based on the pricing of ECS. For more information, see Billing overview.
    Instance Type ecs.mn4.small, an instance type of the shared general-purpose instance family mn4. Scaling groups in a virtual private cloud (VPC) support more newly released instance types. For more information about how to create a scaling group in a VPC, see Create a scaling group.
    Image Public image: CentOS 7.6 64-bit After the instance is started, the operating system and application data of the image are copied to the system disk.
    Public IP Address Pay-by-traffic. A peak bandwidth of 1 Mbit/s You are charged for the outbound Internet traffic. The peak bandwidth is 1 Mbit/s.
    Security Group sg-bp18kz60mefsicfg**** Select the security group that you created.
    System Configurations Logon Credentials Set Later After the ECS instances are created, you can manually set the password for ECS instances.
    Preview Scaling Configuration Name MyFirstScalingConfiguration None
  6. In the Created dialog box, click Enable Configuration.
  7. In the Enable Scaling Configuration message, click OK.
  8. In the Enable Scaling Group message, click OK.

Result

A scaling group must have at least one ECS instance. Therefore, Auto Scaling automatically creates an ECS instance for the scaling group after the scaling group is enabled. You can view the ECS instance in the ECS instance list. Configurations specified in the scaling configuration are applied to the ECS instance that is automatically created. For more information, see View ECS instances. Instances

What to do next

After the scaling group is enabled, you can create scaling rules for the scaling group and create scheduled tasks and event-triggered tasks to automatically scale ECS instances in the scaling group. For more information, see the following topics: