# ess-instance

Part of **ESS**

<!-- intent-backlink:auto -->

> 💡 **Path Selection**: This skill is one implementation path for the following routing skills. If you're unsure which path to take, check the corresponding routing skill:

> - [Create an Auto Scaling group](../../intent/ess-create-group/SKILL.md)
> - [Configure scaling triggers (scheduled or event-based)](../../intent/ess-configure-triggers/SKILL.md)
> - [Integrate Auto Scaling with external services (SLB, RDS, etc.)](../../intent/ess-integrate-services/SKILL.md)
> - [Manage instances within a scaling group](../../intent/ess-manage-instances/SKILL.md)

# Auto Scaling Instance Management Console Guide

## Operations Overview

| Operation | Console Entry | Prerequisites | Description |
|------|-----------|---------|------|
| Create Scaling Group | Console > ECS > Auto Scaling > Scaling Groups > Create Scaling Group | Custom image prepared; VPC and vSwitch created | Creates a new scaling group with specified parameters like min/max instances and network settings |
| Manage Scaling Group | Console > ECS > Auto Scaling > Scaling Groups | Existing scaling group | Enables, disables, modifies, deletes, or views details of scaling groups |
| Manage Instances in Group | Console > ECS > Auto Scaling > Scaling Groups > [Group] > Instances | Scaling group with instances | Adds, removes, protects, stops, or views instances within a scaling group |
| Manage Scaling Rules and Tasks | Console > ECS > Auto Scaling > Scaling Groups > [Group] > Scaling Rules and Event-triggered Tasks | Scaling group created | Creates, modifies, enables, disables, or deletes scaling rules and scheduled/event-triggered tasks |
| Manage Scaling Configurations | Console > ECS > Auto Scaling > Scaling Groups > [Group] > Instance Configuration Sources | Scaling group created | Imports, exports, modifies, or deletes scaling configurations including automatic image updates |
| Manage Lifecycle Hooks | Console > ECS > Auto Scaling > Scaling Groups > [Group] > Lifecycle Hooks | Scaling group created | Creates, modifies, or deletes lifecycle hooks for custom actions during instance launch/termination |
| Configure Permissions and Roles | Console > ECS > Auto Scaling > Permissions | RAM permissions to manage roles | Grants permissions to Auto Scaling or manages service-linked roles |
| Monitor and Automate | Console > ECS > Auto Scaling > Scaling Groups > [Group] > Monitoring | Scaling group with instances | Sets up monitoring, automation, or deployment pipelines with Auto Scaling |
| Handle Billing and Payments | Console > ECS > Instances > Manage Billing | Account with overdue payments | Manages instances or scaling groups after overdue payments |
| Create Auto Scaling Group | Console > ECS > Auto Scaling > Scaling Groups > Create Scaling Group | ECS instance available; VPC created | Sets up a new Auto Scaling group through the console with basic configuration |
| Configure Event Notification | Console > Auto Scaling > Event Notification | Auto Scaling group created; MNS topic available | Sets up event notifications for scaling activities in the console |
| Trigger Scaling Action on Event | Console > Auto Scaling > Event-triggered Tasks > Create Task | Auto Scaling group created; CloudMonitor alarm configured | Configures event-triggered scaling tasks based on CloudMonitor metrics via console |
| Refresh Instances | Console > ECS > Auto Scaling > Auto Scaling Groups > [Group] > Instance Refresh | ECS-type scaling group; valid launch template | Performs instance refresh operations to update running instances using the console |
| Manage Tags | Console > Auto Scaling > Tags | Auto Scaling group exists | Adds, edits, or removes tags for Auto Scaling resources through the console |
| Manually Scale ECS Instances | Console > Auto Scaling > Scaling Groups | RAM user authorization completed; sufficient account balance | Adjusts the number of ECS instances in a scaling group manually via console controls |
| Schedule Instance Scaling | Console > ECS > Auto Scaling > Scaling Groups > [Group] > Scheduled Tasks | Auto Scaling group created; scaling rules defined | Sets up scheduled scaling tasks to automatically adjust capacity at specific times |
| Automatically Scale Instances | Console > ECS > Auto Scaling > Scaling Groups > [Group] > Scaling Rules and Event-triggered Tasks | Scaling group created; ECS instances added; Cloud Monitor enabled | Configures automatic scaling based on service workload metrics like CPU or memory |
| Configure Lifecycle Hooks | Console > Auto Scaling > Scaling Groups > [Group] > Lifecycle Hooks | Scaling group created | Sets up lifecycle hooks for custom actions during instance launch or termination |
| Automatically Deploy Application | Console > Elastic Compute Service > Instances > Auto Scaling | Auto Scaling group created; custom image available | Deploys applications automatically on new ECS instances created by Auto Scaling |
| Monitor Scaling Group | Console > Auto Scaling > Scaling Groups > [Group] > Monitoring | Scaling group created; CloudMonitor enabled | Uses monitoring and logging features to track scaling group performance and status |
| Configure Access Control | Console > RAM > Permissions > Create Policy | Alibaba Cloud account with admin privileges | Sets up RAM policies, service-linked roles, or resource groups for secure access |
| Adjust Instance Count | Console > ECS > Auto Scaling > Scaling Groups | Existing scaling group created | Scales instance count dynamically based on real-time workload demands |
| Configure Scaling Policies | Console > ECS > Auto Scaling > Scaling Groups | Auto Scaling activated in selected region | Sets up and manages different types of scaling policies including target tracking, predictive, scheduled, and event-triggered rules |
| Manage Scaling Configurations | Console > ECS > Auto Scaling > Scaling Groups > [Group] > Instance Configuration Sources | Scaling group with at least one scaling configuration | Creates, updates, and manages scaling configurations including instance templates, images, and advanced features |
| Manage Notifications | Console > ECS > Auto Scaling > Event Notifications | MNS topic or queue created | Configures event and message notifications for scaling group activities and vertical scaling tasks |
| Optimize Costs | Console > ECS > Auto Scaling > Scaling Groups > [Group] > Configuration | Alibaba Cloud account; scaling group with ECI instances | Implements cost optimization strategies using spot instances, multiple instance types, and economical modes |
| Integrate with Other Services | Console > Auto Scaling > Scaling Groups > [Group] > Modify | Scaling group in Enabled state; database instance available | Automatically manages whitelists and connections with databases, load balancers, and network resources during scaling events |
| Automate Instance Setup | Console > Auto Scaling > Scaling Groups > [Group] > Lifecycle Hooks | Script ready for execution; existing scaling group | Automatically configures instances during scaling using user data, scripts, and resource packages |
| Manage Permissions | Console > Auto Scaling > Scaling Groups > Permissions | Auto Scaling group already created | Configures fine-grained access control for scaling groups using resource groups, tags, and ARN-based authentication |
| Vertical Scaling | Console > ECS > Auto Scaling > Vertical Scaling | RAM role configured for OOS service; pay-as-you-go instance | Configures, views, and manages vertical scaling tasks for changing instance specifications |
| Monitor and Diagnose | Console > ECS > Auto Scaling > Scaling Groups > [Group] > Activity | Scaling group must exist; at least one scaling activity executed | Views scaling activities, metrics, instance counts, and runs health diagnostics |

## Step-by-Step Instructions

### Create Scaling Group

**Navigation**: Console > ECS > Auto Scaling > Scaling Groups > Create Scaling Group

**Prerequisites**:
- A custom image for the application instance must be prepared
- Subscription ECS instances created for daily business needs
- VPC and at least one vSwitch in the desired region

1. Navigate to the Images page in the ECS console
   - Element: **Images** (menu) — left navigation panel

2. Select the region where the instances will be created
   - Element: **Region** (dropdown) — top-right corner

3. Click Create Instance in the Actions column for the custom image
   - Element: **Create Instance** (button) — Actions column

4. Set Billing Type to Subscription and configure other instance parameters
   - Element: **Billing Type** (dropdown) — main content area
   - Notes: Ensure 'Subscription' is selected as the billing type

5. Go to the Scaling Groups page and click Create
   - Element: **Create** (button) — top-right corner

6. Configure scaling group parameters including Minimum Number of Instances, Network Type, Scaling Policy, and Instance Reclaim Mode
   - Element: **Minimum Number of Instances** (text_input) — main content area
   - Notes: Set to 0 for automatic scaling; set Network Type to VPC

7. Click Details in the Actions column for the created scaling group
   - Element: **Details** (link) — Actions column

8. Click Create Scaling Configuration and set Image to the custom image of the web application
   - Element: **Create Scaling Configuration** (button) — main content area

9. Enable the scaling configuration and scaling group
   - Element: **Enable** (button) — main content area

10. On the Instances tab, add subscription ECS instances to the scaling group
    - Element: **Instances** (tab) — top navigation

11. Put the subscription ECS instances into Protected state
    - Element: **Protected** (checkbox) — main content area
    - Notes: Ensures these instances are not removed during scale-in events

12. Edit the scaling group and modify Minimum and Maximum Number of Instances
    - Element: **Edit** (button) — Actions column

13. Create a target tracking scaling rule with Metric Type set to (ECS) Average CPU Utilization and Target Value set to 50%
    - Element: **Scaling Rules** (tab) — top navigation
    - Notes: This ensures dynamic scaling based on CPU load

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Billing Type | dropdown | Yes | Pay-As-You-Go, Subscription | Specifies the payment method for the ECS instance |
| Image | dropdown | Yes | — | The custom image used to launch the ECS instance |
| Minimum Number of Instances | number | Yes | — | The minimum number of instances that must be maintained in the scaling group |
| Maximum Number of Instances | number | Yes | — | The maximum number of instances allowed in the scaling group |
| Network Type | dropdown | Yes | Classic Network, VPC | The network environment for the ECS instance |
| Scaling Policy | dropdown | Yes | Balanced Distribution Policy, Simple Policy | Determines how new instances are distributed across zones |
| Instance Reclaim Mode | dropdown | Yes | Release, Keep | Defines what happens to instances when they are removed from the scaling group |
| Associate CLB Instance | checkbox | No | — | Whether to associate the scaling group with a Classic Load Balancer |
| Associate ALB and NLB Server Groups | checkbox | No | — | Whether to associate the scaling group with Application or Network Load Balancer server groups |
| Associate ApsaraDB RDS Instance | checkbox | No | — | Whether to associate the scaling group with an ApsaraDB RDS instance |
| Rule Type | dropdown | Yes | Target Tracking Scaling Rule, Simple Scaling Rule | The type of scaling rule to create |
| Metric Type | dropdown | Yes | (ECS) Average CPU Utilization, (ECS) Average Memory Utilization | The metric used to trigger scaling actions |
| Target Value | text | Yes | — | The target value for the metric (e.g., 50% CPU utilization) |

### Manage Scaling Group

**Navigation**: Console > ECS > Auto Scaling > Scaling Groups

**Prerequisites**:
- An existing scaling group must be created
- Valid RAM role with appropriate permissions
- Network configuration (VPC, security group) set up

1. Navigate to the Auto Scaling section in the ECS console
   - Element: **Auto Scaling** (link) — left navigation panel

2. Click on 'Scaling Groups' from the submenu
   - Element: **Scaling Groups** (link) — top navigation bar

3. Select the target scaling group from the list
   - Element: **Scaling Group ID or Name** (checkbox) — main content area
   - Notes: Use the search bar if the group is not visible

4. Click the 'Edit' button to modify group settings
   - Element: **Edit** (button) — top-right corner
   - Notes: Changes may require a cooldown period before taking effect

5. Adjust instance count, scaling policies, or health check settings
   - Element: **Instance Count** (text_input) — form fields
   - Notes: Minimum and maximum instance counts are enforced

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Scaling Group Name | text | Yes | — | Unique name for the scaling group |
| Min Instance Count | number | Yes | — | Minimum number of instances to maintain |
| Max Instance Count | number | Yes | — | Maximum number of instances allowed |
| Health Check Type | dropdown | Yes | ELB Health Check, TCP Connect, HTTP Get | Method used to determine instance health |

### Manage Instances in Group

**Navigation**: Console > ECS > Auto Scaling > Scaling Groups > [Group] > Instances

**Prerequisites**:
- The scaling group is in the Enabled state.
- The scaling group has no scaling activities in progress.

1. Navigate to the scaling group and view its instances.
   - Element: **Scaling Groups** (link) — left navigation panel

2. Select the instance(s) to remove or delete.
   - Element: **Select multiple instances** (checkbox) — main content area

3. Click 'Remove from Scaling Group' to remove an instance without deleting it.
   - Element: **Remove from Scaling Group** (button) — bottom of page
   - Notes: Available only if the instance lifecycle is managed by the scaling group.

4. Click 'Delete Instance' to remove and release the instance.
   - Element: **Delete Instance** (button) — bottom of page
   - Notes: Only available if the instance lifecycle is managed by the scaling group. If not, only 'Remove from Scaling Group' is available.

5. Specify whether to disassociate the instance from SLB and RDS instances.
   - Element: **Disassociate from SLB and RDS** (checkbox) — confirmation dialog
   - Notes: Required when deleting ECS instances; optional but recommended for elastic container instances.

6. Click OK to confirm the operation.
   - Element: **OK** (button) — bottom of confirmation dialog

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Disassociate from SLB and RDS | checkbox | No | — | Specifies whether to automatically disassociate the instance from related Server Load Balancer and ApsaraDB RDS instances during deletion. |

### Manage Scaling Rules and Tasks

**Navigation**: Console > ECS > Auto Scaling > Scaling Groups > [Group] > Scaling Rules and Event-triggered Tasks

**Prerequisites**:
- Account must have sufficient balance
- Scaling group must be in 'Enabled' state
- No ongoing scaling activities in the group
- VPC and security group configured if needed

1. Find the scaling group that you want to manage
   - Element: **Operation** (column) — main content area

2. Click the Details button for the scaling group
   - Element: **Details** (button) — top-right corner

3. Click the Scaling Rules tab
   - Element: **Scaling Rules** (tab) — top navigation panel

4. Click the Create Scaling Rule link
   - Element: **Create Scaling Rule** (link) — main content area

5. Enter a name for the scaling rule
   - Element: **Rule Name** (text_input) — form field

6. Select a scaling rule type and configure corresponding parameters
   - Element: **Scaling Rule Type** (dropdown) — form field
   - Notes: Different rule types have different required parameters; e.g., step rules require an event-triggered task

7. Click Confirm to create the rule
   - Element: **Confirm** (button) — bottom of form

8. Execute a scaling rule manually
   - Element: **Execute** (button) — Operations column
   - Notes: Available only for simple and step scaling rules

9. Modify a scaling rule
   - Element: **Modify** (button) — Operations column
   - Notes: Cannot change rule type or certain parameters like event-triggered task for step rules

10. Delete a scaling rule
    - Element: **Delete** (button) — Operations column
    - Notes: Confirmation dialog appears before deletion

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Rule Name | text | Yes | — | A unique name for the scaling rule |
| Scaling Rule Type | dropdown | Yes | Simple Scaling Rule, Step Scaling Rule, Target Tracking Scaling Rule, Predictive Scaling Rule | Determines the behavior and configuration options of the rule |
| Execute Action | dropdown | Yes | Adjust to N instances, Add N instances, Add N%, Remove N instances, Remove N% | The action to perform when the rule is triggered |
| Cooldown Time | number | No | — | Time in seconds after which another scaling activity can be triggered |
| Metric Type | radio | Yes | System Monitoring, Custom Monitoring | Specifies whether to use CloudMonitor system metrics or custom metrics |
| Target Value | number | Yes | — | The target value for the selected CloudMonitor metric |
| Estimated Instance Warmup | number | No | — | Time in seconds during which new instances are added but not included in monitoring calculations |
| Scale-Out Evaluation Count | number | No | — | Number of consecutive times the threshold must be met before triggering scale-out |
| Scale-In Evaluation Count | number | No | — | Number of consecutive times the threshold must be met before triggering scale-in |
| Disable Scale-In | checkbox | No | — | If enabled, only scale-out activities are allowed |
| Use Existing Target Tracking Rule | checkbox | No | — | Whether to reuse settings from an existing target tracking rule |
| Prediction Mode | radio | Yes | Generate Prediction Only, Generate Prediction and Scale | Controls whether prediction results are used to trigger scaling |
| Initial Max Size | number | No | — | Upper limit on the number of instances in the scaling group |
| Predictive Value Behavior | radio | Yes | Predictive Override Max, Max Override Predictive, Predictive Above Max | How to handle predictions exceeding the preset maximum value |
| Predictive Value Buffer | number | No | — | Percentage increase applied to predicted value when using 'Predictive Above Max' behavior |
| Predictive Task Buffer Time | number | No | — | Minutes before the hour to start prediction tasks for resource preparation |

### Manage Scaling Configurations

**Navigation**: Console > ECS > Auto Scaling > Scaling Groups > [Group] > Instance Configuration Sources

**Prerequisites**:
- A scaling group with at least one scaling configuration
- Permissions to manage scaling configurations in the Auto Scaling console

1. Log on to the Auto Scaling console
   - Element: **Auto Scaling console** (link) — top navigation bar

2. Click the Scaling Groups tab in the left-side navigation pane
   - Element: **Scaling Groups** (menu) — left-side navigation panel

3. Select a region from the top navigation bar
   - Element: **region dropdown** (dropdown) — top navigation bar

4. Find the scaling group and click the Details button in the Operations column
   - Element: **Details** (button) — main content area

5. Click the Instance Configuration Sources tab
   - Element: **Instance Configuration Sources** (tab) — main content area

6. Find the scaling configuration and click Enable in the Operations column
   - Element: **Enable** (button) — main content area

7. Click OK in the confirmation dialog
   - Element: **OK** (button) — confirmation dialog

8. Click Modify in the Operations column
   - Element: **Modify** (button) — main content area

9. Update parameters on the Modify Configuration page
   - Element: **Modify Configuration** (link) — main content area

10. Click Confirm in the Preview dialog
    - Element: **Confirm** (button) — preview dialog

11. Click Delete in the Operations column
    - Element: **Delete** (button) — main content area

12. Click OK in the confirmation message
    - Element: **OK** (button) — confirmation dialog

13. Click Export Scaling Configuration
    - Element: **Export Scaling Configuration** (button) — main content area

14. Click Import Scaling Configuration
    - Element: **Import Scaling Configuration** (button) — main content area

15. Click Choose File and select the .json file
    - Element: **Choose File** (button) — file upload section

16. Select configurations to import in the preview section
    - Element: **configuration checkboxes** (checkbox) — preview section

17. Optionally check the suffix checkbox to avoid name conflicts
    - Element: **suffix checkbox** (checkbox) — import options

18. Click Start Upload and confirm completion
    - Element: **Start Upload** (button) — upload section

### Manage Lifecycle Hooks

**Navigation**: Console > ECS > Auto Scaling > Scaling Groups > [Group] > Lifecycle Hooks

**Prerequisites**:
- A scaling group has been created
- Optional: MNS topic or queue created for notifications

1. Click Create Lifecycle Hook
   - Element: **Create Lifecycle Hook** (button) — top-right corner of the Lifecycle Hooks tab

2. On the Create Lifecycle Hook page, configure the lifecycle hook
   - Element: **Create Lifecycle Hook** (link) — main content area

3. Click Confirm
   - Element: **Confirm** (button) — bottom of the form

4. Find the scaling group and click Details in the Operations column
   - Element: **Details** (link) — Operations column

5. Click the Lifecycle Hooks tab and go to the Lifecycle Hooks section
   - Element: **Lifecycle Hooks** (tab) — top navigation panel

6. Modify or delete the lifecycle hook
   - Element: **Modify / Delete** (button) — Operations column

7. Disable or enable the lifecycle hook
   - Element: **Suspend / Resume** (button) — Operations column

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Name | text | Yes | — | The name of the lifecycle hook, which cannot be changed after creation. Must be 2 to 64 characters long, start with a letter, digit, or Chinese character, and can contain periods (.), underscores (_), and hyphens (-). |
| Scaling Activity Type | dropdown | Yes | Scale Out, Scale In | The type of scaling activity that triggers the lifecycle hook and places the ECS instance or ECI instance into a pending state. |
| Heartbeat Timeout | number | No | — | The timeout period of the lifecycle hook, in seconds. Value must be an integer from 30 to 21600 (6 hours). |
| Default Result | dropdown | Yes | Continue, Reject, Rollback | The action to perform after an ECS instance or ECI instance exits the pending state. |
| Notification Mode | dropdown | No | None, MNS Topic, MNS Queue, OOS Template, EventBridge | When a lifecycle hook is triggered, choose to send a notification or automatically perform other actions. |

### Configure Permissions and Roles

**Navigation**: Console > ECS > Auto Scaling > Permissions

**Prerequisites**:
- Auto Scaling service must be enabled
- User must have RAM permissions to manage roles and policies

1. Follow the instructions in the console to proceed with authorization
   - Element: **Go to Authorize** (button) — top-right corner of the authorization prompt
   - Notes: This step appears only if AliyunServiceRoleForAutoScaling fails to be created automatically.

2. Select the default service role for Auto Scaling
   - Element: **AliyunESSDefaultRole** (radio) — role selection list on the authorization page
   - Notes: The role is pre-configured with the required system policy. No additional configuration is needed.

3. Confirm the authorization policy assignment
   - Element: **Confirm Authorization Policy** (button) — bottom of the authorization form
   - Notes: After clicking, the role is attached to Auto Scaling and permissions are granted.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Select Role | radio | Yes | AliyunESSDefaultRole | Choose the RAM role that Auto Scaling will use to access other Alibaba Cloud resources. |

### Monitor and Automate

**Navigation**: Console > Auto Scaling > Scaling Activities > View Status

**Prerequisites**:
- Auto Scaling group already created
- Scaling activities have been triggered

1. Navigate to the Scaling Activities page
   - Element: **Scaling Activities** (link) — left navigation panel

2. View the list of recent scaling activities
   - Element: **Activity List** (table) — main content area
   - Notes: Each row shows the activity ID, type, status, start time, and duration.

3. Check the status column for the current state of each activity
   - Element: **Status** (column) — Activity List table
   - Notes: Status values include: Pending, InProgress, Successful, Failed, Cancelled.

### Handle Billing and Payments

**Navigation**: Console > ECS > Instances > Manage Billing

**Prerequisites**:
- Account with sufficient balance or vouchers
- Auto Scaling group configured with ECS instances
- Understanding of billing models: subscription, pay-as-you-go, mixed

**Steps**:
- No specific UI steps provided in source documentation

### Create Auto Scaling Group

**Navigation**: Console > Auto Scaling > Scaling Groups > Create Scaling Group

**Prerequisites**:
- An ECS instance must be available in the target region
- A VPC and subnet must be created
- RAM role with appropriate permissions configured

1. Click on 'Create Scaling Group' button
   - Element: **Create Scaling Group** (button) — top-right corner of the Scaling Groups page

2. Select a region from the dropdown menu
   - Element: **Region** (dropdown) — left navigation panel

3. Choose a VPC and subnet from the respective dropdowns
   - Element: **VPC** (dropdown) — main content area
   - Notes: Ensure the selected VPC has sufficient IP addresses available

4. Set the minimum and maximum number of instances
   - Element: **Minimum Instance Count** (text_input) — main content area
   - Notes: Minimum count must be at least 0

5. Select an instance type from the list
   - Element: **Instance Type** (dropdown) — main content area
   - Notes: Available types depend on the selected region

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Scaling Group Name | text | Yes | — | The name of the scaling group. Must be unique within the region. |
| Min Instance Count | number | Yes | — | The minimum number of instances that should always be running. |
| Max Instance Count | number | Yes | — | The maximum number of instances allowed in the scaling group. |
| Instance Type | dropdown | Yes | ecs.g6.large, ecs.g6.xlarge, ecs.c6.large, ecs.c6.xlarge | The type of ECS instance to launch in the scaling group. |

### Configure Event Notification

**Navigation**: Auto Scaling > Event Notification

**Prerequisites**:
- An Auto Scaling group must be created
- A Message Service (MNS) topic must be available

1. Navigate to the Event Notification page
   - Element: **Event Notification** (link) — left navigation panel

2. Click Create Notification
   - Element: **Create Notification** (button) — top-right corner

3. Select the Auto Scaling group to monitor
   - Element: **Select Auto Scaling Group** (dropdown) — main content area
   - Notes: Only groups with active scaling policies are listed.

4. Choose the notification type from the dropdown
   - Element: **Notification Type** (dropdown) — form fields section
   - Notes: Options include: Scale Out, Scale In, and All Events.

5. Enter the MNS topic ARN or select from the list
   - Element: **Topic ARN** (text_input) — form fields section
   - Notes: The topic must be in the same region as the Auto Scaling group.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Auto Scaling Group | dropdown | Yes | — | Select the Auto Scaling group for which you want to enable event notifications. |
| Notification Type | dropdown | Yes | Scale Out, Scale In, All Events | Specify the types of scaling events that trigger a notification. |
| Topic ARN | text_input | Yes | — | Enter the ARN of the MNS topic to which notifications will be sent. |

### Trigger Scaling Action on Event

**Navigation**: Console > Auto Scaling > Event-triggered Tasks > Create Task

**Prerequisites**:
- An Auto Scaling group must be created
- The event source (e.g., CloudMonitor alarm) must be configured
- Required RAM permissions for triggering scaling actions

1. Click the 'Create Task' button
 - Element: **** (button) — top-right corner of the Event-triggered Tasks page

2. Select an event source from the dropdown
 - Element: **** (dropdown) — main content area
   - Notes: Available sources include CloudMonitor alarms, SLS logs, and custom events.

3. Choose a scaling action from the list
 - Element: **** (dropdown) — main content area
   - Notes: Options include AddInstances, RemoveInstances, and SetDesiredCapacity.

4. Set the cooldown period for the task
 - Element: **** (text_input) — form field section
   - Notes: Default is 300 seconds. Minimum is 60 seconds.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| text | Yes | — | A unique name for the event-triggered task |
| dropdown | Yes | CloudMonitor Alarm, SLS Log, Custom Event | The source that triggers the scaling action |
| dropdown | Yes | AddInstances, RemoveInstances, SetDesiredCapacity | The scaling operation to perform when the event is triggered |
| number | No | — | The time interval after which another scaling action can be triggered |

### Refresh Instances

**Navigation**: Console > ECS > Auto Scaling > Auto Scaling Groups > [Group] > Instance Refresh

**Prerequisites**:
- An Auto Scaling group must exist
- A valid launch template or launch configuration must be associated with the group
- The group must have at least one instance

1. Navigate to the Auto Scaling Groups page in the ECS console
   - Element: **Auto Scaling** (menu) — left navigation panel

2. Select the target Auto Scaling group from the list
   - Element: **Select Group** (link) — main content area

3. Click the 'Instance Refresh' button in the top-right corner
   - Element: **Instance Refresh** (button) — top-right corner
   - Notes: This opens the Instance Refresh wizard.

4. Choose whether to use the current launch template or a new one
   - Element: **Use Current Launch Template** (radio) — main content area
   - Notes: If selecting a new template, browse and select from available templates.

5. Set the refresh strategy: rolling update or full replacement
   - Element: **Refresh Strategy** (dropdown) — main content area
   - Notes: Rolling update replaces instances gradually; full replacement replaces all at once.

6. Configure the batch size and wait time between batches
   - Element: **Batch Size** (text_input) — main content area
   - Notes: Default is 1. Adjust for faster or slower rollout.

7. Review the settings and click 'Start Refresh'
   - Element: **Start Refresh** (button) — bottom of the form
   - Notes: The operation begins immediately after confirmation.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Use Current Launch Template | radio | Yes | Yes, No | Determines whether to use the existing launch template or specify a new one for the refreshed instances. |
| Refresh Strategy | dropdown | Yes | Rolling Update, Full Replacement | Defines how instances are replaced during the refresh process. |
| Batch Size | number | Yes | — | Number of instances to replace in each batch during a rolling update. |
| Wait Time Between Batches (seconds) | number | No | — | Time to wait before starting the next batch of instance replacements. |

### Manage Tags

**Navigation**: Console > Auto Scaling > Tags

**Prerequisites**:
- User must have permissions to manage tags in Auto Scaling
- At least one Auto Scaling group must exist

1. Navigate to the Tags page in the Auto Scaling console
   - Element: **Tags** (link) — left navigation panel

2. Click the Create Tag button to add a new tag
   - Element: **Create Tag** (button) — top-right corner
   - Notes: The Create Tag dialog appears with fields for key and value.

3. Enter a tag key and value in the respective fields
   - Element: **Key** (text_input) — main content area
   - Notes: Tag keys must be unique within a resource. Values can be repeated across different keys.

4. Click Save to apply the tag to selected resources
   - Element: **Save** (button) — bottom of the dialog
   - Notes: After saving, the tag appears in the list of existing tags.

5. To edit an existing tag, select it and click Edit
   - Element: **Edit** (link) — right side of the tag row
   - Notes: Editing changes only the tag value; the key cannot be modified after creation.

6. To delete a tag, select it and click Delete
   - Element: **Delete** (link) — right side of the tag row
   - Notes: Deleting a tag removes it from all associated resources.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Key | text | Yes | — | The name of the tag used to categorize the resource. |
| Value | text | Yes | — | The value assigned to the tag key, providing additional metadata. |

### Manually Scale ECS Instances

**Navigation**: Console > Auto Scaling > Scaling Groups

**Prerequisites**:
- RAM user authorization completed
- Service-linked role AliyunServiceRoleForAutoScaling created
- RAM user granted AliyunESSFullAccess permission (if applicable)
- Account balance (cash + coupons) ≥ 100.00 CNY

1. Navigate to the Auto Scaling console and select the region
   - Element: **ECS > Auto Scaling > Scaling Groups** (menu) — left navigation panel

2. Click Create Scaling Group
   - Element: **Create Scaling Group** (button) — upper-left corner of the Scaling Groups page

3. Configure scaling group parameters and create
   - Element: **Create** (button) — form footer
   - Notes: Set minimum size to 1, maximum size to 5, select VPC and one or more vSwitches

4. Go to the Configurations tab and click Create Configuration
   - Element: **Create Configuration** (button) — top of the Configurations tab

5. Configure scaling configuration parameters and create
   - Element: **Create** (button) — bottom of the configuration form
   - Notes: Set billing method to Pay-as-you-go, instance pattern to 2 vCPUs, 4 GiB Memory, use Alibaba Cloud Linux 3.2104 LTS 64-bit image, system disk: Enterprise SSD, 40 GiB PL0, assign public IPv4 address with 1 Mbit/s bandwidth, select existing security group

6. Confirm preview and create scaling configuration
   - Element: **Create** (button) — Preview dialog box

7. Enable the scaling configuration
   - Element: **Enable** (button) — confirmation dialog
   - Notes: The scaling configuration must be enabled before it can be used by the scaling group

8. Enable the scaling group
   - Element: **OK** (button) — enable group confirmation message
   - Notes: Enabling the scaling group allows Auto Scaling to automatically create instances based on the configuration

9. Go to the Rules tab and create a scaling rule
   - Element: **Create Rule** (button) — Rules tab

10. Configure a simple scaling rule to add 1 instance
    - Element: **Create** (button) — rule creation form
    - Notes: Name: add, Type: Simple Scaling Rule, Action: Add 1 Instance

11. Create a second scaling rule to remove 1 instance
    - Element: **Create** (button) — rule creation form
    - Notes: Name: remove, Type: Simple Scaling Rule, Action: Remove 1 Instance

12. Manually execute the scale-out rule
    - Element: **Execute** (button) — Operations column
    - Notes: Verify that an ECS instance is created in the scaling group

13. Manually execute the scale-in rule
    - Element: **Execute** (button) — Operations column
    - Notes: Verify that an ECS instance is removed from the scaling group

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Scaling Group Name | text | Yes | — | Enter a name for the scaling group. The name must meet the format requirements displayed on the UI. |
| Group Type | dropdown | Yes | ECS | Select ECS, which specifies that the scaling group contains ECS instances. |
| Source | dropdown | Yes | Create from Scratch | Do not specify the template for automatically creating ECS instances at this stage. After the scaling group is created, you can proceed to create a scaling configuration. |
| Minimum Number of Instances | number | Yes | — | Specify the minimum number of instances in the scaling group. If the number of instances falls below this value, Auto Scaling will add ECS instances until the desired minimum is reached. |
| Maximum Number of Instances | number | Yes | — | Specify the maximum number of instances in the scaling group. If the number of instances exceeds this value, Auto Scaling will remove ECS instances until the number of instances falls below the specified limit. |
| VPC | dropdown | Yes | — | Select a VPC for the ECS instances in the scaling group. |
| vSwitch | checkbox | Yes | — | Select one or more vSwitches for the ECS instances in the scaling group. We recommend selecting multiple vSwitches to improve the success rate of scale-out events. |
| Scaling Configuration Name | text | Yes | — | Enter a name for the scaling configuration. The name must meet the format requirements displayed on the UI. |
| Billing Method | dropdown | Yes | Pay-as-you-go | Auto Scaling is free. However, charges apply for ECS instances created during scale-out events. In this example, the pay-as-you-go billing method is used. |
| Instance Pattern | dropdown | Yes | Specify Instance Pattern | Select Specify Instance Pattern to choose specifications for ECS instances. |
| Instance Specifications | text | Yes | 2 vCPUs, 4 GiB Memory, Enterprise Level | Select the appropriate number of vCPUs and memory size for ECS instances based on your business requirements. |
| Image | dropdown | Yes | Public Image: Alibaba Cloud Linux 3.2104 LTS 64-bit | Select an image to deploy ECS instances. This example uses a public image. In real-world scenarios, you can choose a custom image specific to your application. |
| System Disk | dropdown | Yes | Enterprise SSD (ESSD), 40 GiB, PL0 | Select a system disk for ECS instances. |
| Assign Public IPv4 Address | radio | Yes | Yes, No | Specify whether to assign public IP addresses to ECS instances. Outbound public bandwidth is charged separately, and the fees are included in your ECS instance costs. |
| Bandwidth | text | Yes | — | Specify the outbound public bandwidth for the ECS instances. |
| Security Group | dropdown | Yes | — | Select an existing security group. For information about how to create a security group, see Create a security group. |
| Credentials | dropdown | Yes | Set Later | Select Set Later, which requires you to manually configure passwords for ECS instances after you create the instances. |
| Rule Name | text | Yes | — | Enter a name for the scaling rule. The name must meet the format requirements displayed on the UI. |
| Rule Type | dropdown | Yes | Simple Scaling Rule | Specify the type of the scaling rule. In this example, select Simple Scaling Rule. |
| Action | text | Yes | — | Specify the number of instances to add or remove when the scaling rule is executed. The number of instances added or removed during each scaling event must not exceed 1,000. |
| Cooldown Period | number | No | — | Optional. Specify the cooldown period for the scaling rule. Unit: seconds. If you do not configure this parameter, the cooldown period of the scaling group takes effect. |

### Schedule Instance Scaling

**Navigation**: Console > Elastic Compute Service (ECS) > Auto Scaling > Scaling Groups > [Scaling Group Name] > Scheduled Tasks

**Prerequisites**:
- An Auto Scaling group must be created and configured
- Scaling rules (e.g., add/remove instances) must be defined in the scaling group

1. Navigate to the scaling group details page and switch to the Scheduled Tasks tab
   - Element: **Scheduled Tasks** (tab) — top navigation panel

2. Click the Create button to start configuring a new scheduled task
   - Element: **Create** (button) — top-right corner

3. Enter a name for the task and set the launch time
   - Element: **Task Name** (text_input) — main content area
   - Notes: Follow on-screen format requirements

4. Select 'Select an existing rule' for scaling type
   - Element: **Scaling Type** (dropdown) — main content area
   - Notes: Must be set to 'Select an existing rule'

5. Choose the appropriate scaling rule (e.g., 'add' or 'remove')
   - Element: **Scaling Rule** (dropdown) — main content area

6. Set the recurrence schedule (e.g., Daily, repeats every 1 day)
   - Element: **Repetition Period** (dropdown) — main content area

7. Click Confirm to save the scheduled task
   - Element: **Confirm** (button) — bottom of form

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Task Name | text | Yes | — | Enter a unique name for the scheduled task. Follow on-screen format tips. |
| Launch Time | datetime | Yes | — | Set the date and time when the task should run. |
| Scaling Type | dropdown | Yes | Select an existing rule | Choose the method for scaling. For scheduled tasks, this must be 'Select an existing rule'. |
| Scaling Rule | dropdown | Yes | add, remove | Select the scaling rule to execute (e.g., add one instance or remove one instance). |
| Repetition Period | dropdown | Yes | Daily, Weekly, Monthly | Define how often the task repeats. Example: 'Daily, repeats every 1 day'. |

### Automatically Scale Instances

**Navigation**: Console > Elastic Compute Service > Auto Scaling > Scaling Groups > [Scaling Group Name] > Scaling Rules and Event-triggered Tasks

**Prerequisites**:
- A scaling group must be created
- ECS instances must be added to the scaling group
- Cloud Monitor must be enabled for the scaling group

1. Click the 'Scaling Rules and Event-triggered Tasks' tab
   - Element: **Scaling Rules and Event-triggered Tasks** (tab) — top navigation panel

2. Click the 'Create Event-triggered Task' button
   - Element: **Create Event-triggered Task** (button) — top-right corner of the tab

3. Enter a name for the task
   - Element: **Name** (text_input) — form fields section
   - Notes: Follow UI instructions for format requirements

4. Select one or more system-defined metrics, such as (ECS) CPU Utilization
   - Element: **Multiple Metric** (dropdown) — form fields section
   - Notes: Click 'Add' to select multiple metrics

5. Set statistical method to 'Average >= 70%' for scale-out or 'Average <= 20%' for scale-in
   - Element: **Statistical Method** (dropdown) — form fields section
   - Notes: The threshold values are critical for triggering scaling actions

6. Select the scaling rule to execute after an alert is triggered
   - Element: **Rule to Execute** (dropdown) — form fields section
   - Notes: Choose 'add' for scale-out, 'remove' for scale-in

7. Click the 'Confirm' button to save the configuration
   - Element: **Confirm** (button) — bottom of the form

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Name | text | Yes | — | Enter a descriptive name for the event-triggered task. |
| Multiple Metric | dropdown | Yes | (ECS) CPU Utilization, (ECS) Network In, (ECS) Network Out | Select one or more system-defined metrics to monitor. The task triggers when the metric meets the specified condition. |
| Statistical Method | dropdown | Yes | Average >= X%, Maximum >= X%, Minimum <= X% | Define the rule for determining whether the metric value exceeds the threshold. |
| Rule to Execute | dropdown | Yes | add, remove | Specify which scaling rule to execute when the alert is triggered. |

### Configure Lifecycle Hooks

**Navigation**: Console > Auto Scaling > Scaling Groups > [Select Group] > Lifecycle Hooks

**Prerequisites**:
- A scaling group has been created
- Optional: MNS topic or queue created for notifications

1. Click Create Lifecycle Hook
   - Element: **Create Lifecycle Hook** (button) — top-right corner of the Lifecycle Hooks tab

2. On the Create Lifecycle Hook page, configure the lifecycle hook
   - Element: **Create Lifecycle Hook** (link) — main content area

3. Click Confirm
   - Element: **Confirm** (button) — bottom of the form

4. Find the scaling group and click Details in the Operations column
   - Element: **Details** (link) — Operations column

5. Click the Lifecycle Hooks tab and go to the Lifecycle Hooks section
   - Element: **Lifecycle Hooks** (tab) — top navigation panel

6. Modify or delete the lifecycle hook
   - Element: **Modify / Delete** (button) — Operations column

7. Disable or enable the lifecycle hook
   - Element: **Suspend / Resume** (button) — Operations column

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Name | text | Yes | — | The name of the lifecycle hook, which cannot be changed after creation. Must be 2 to 64 characters long, start with a letter, digit, or Chinese character, and can contain periods (.), underscores (_), and hyphens (-). |
| Scaling Activity Type | dropdown | Yes | Scale Out, Scale In | The type of scaling activity that triggers the lifecycle hook and places the ECS instance or ECI instance into a pending state. |
| Heartbeat Timeout | number | No | — | The timeout period of the lifecycle hook, in seconds. Value must be an integer from 30 to 21600 (6 hours). |
| Default Result | dropdown | Yes | Continue, Reject, Rollback | The action to perform after an ECS instance or ECI instance exits the pending state. |
| Notification Mode | dropdown | No | None, MNS Topic, MNS Queue, OOS Template, EventBridge | When a lifecycle hook is triggered, choose to send a notification or automatically perform other actions. |

### Automatically Deploy Application

**Navigation**: Console > Elastic Compute Service > Instances > Auto Scaling

**Prerequisites**:
- An Auto Scaling group has been created
- A custom image with the required application dependencies is available
- Basic knowledge of Linux shell scripting and system initialization

1. Create a Shell script for testing
   - Element: **Create a Shell script** (text_input) — main content area
   - Notes: The script must include proper shebang and chkconfig directives for CentOS 6 and earlier.

2. Place the test script in the /etc/rc.d/init.d/ directory and run the chkconfig --level 6 test on command
   - Element: **Upload Script** (button) — top-right corner
   - Notes: Ensure the script is executable and properly configured for runlevel 6 or 0 depending on whether it should run at reboot or shutdown.

3. Create the run-script-when-shutdown.service file in the /etc/systemd/system directory
   - Element: **Edit Service File** (text_input) — configuration panel
   - Notes: Replace /path/to/script/to/run with the absolute path of the actual script to be executed during shutdown.

4. Run systemctl enable run-script-when-shutdown and systemctl start run-script-when-shutdown commands
   - Element: **Enable Service** (button) — services tab
   - Notes: This activates the service so it runs when the system shuts down.

### Monitor Scaling Group

**Navigation**: Console > Auto Scaling > Scaling Groups > Monitoring and Logging

**Prerequisites**:
- Scaling group already created
- CloudMonitor service enabled
- Notification topic or queue configured for event alerts

1. Navigate to the Scaling Groups page in the Auto Scaling console
   - Element: **Scaling Groups** (link) — left navigation panel

2. Select a scaling group from the list
   - Element: **Scaling Group Name** (link) — main content area

3. Click on the 'Monitoring' tab to view real-time metrics
   - Element: **Monitoring** (tab) — top navigation bar

4. Review instance performance metrics such as CPU utilization
   - Element: **Performance Metrics** (text_input) — main content area
   - Notes: Metrics are updated in real time; hover over data points for details.

5. Check the health status of instances under the 'Health Status' section
   - Element: **Health Status** (text_input) — main content area
   - Notes: Unhealthy instances are highlighted with a warning icon.

6. Configure event notifications by clicking 'Event Notification Settings'
   - Element: **Event Notification Settings** (button) — top-right corner
   - Notes: You can set up notifications to CloudMonitor, MNS topic, or MNS queue.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Notification Type | dropdown | Yes | CloudMonitor, Message Service (MNS) Topic, Message Service (MNS) Queue | Select the destination for event notifications. |
| Health Check Mode | checkbox | No | Custom Health Check, Instance Status Health Check, Load Balancer Health Check | Choose one or more health check methods to monitor instance health. |

### Configure Access Control

**Navigation**: Console > RAM > Permissions > Create Policy

**Prerequisites**:
- An Alibaba Cloud account with administrative privileges
- Basic understanding of RAM concepts and policies

1. Navigate to the RAM console
   - Element: **RAM** (link) — left navigation panel

2. Click on 'Permissions' in the left sidebar
   - Element: **Permissions** (link) — left navigation panel

3. Click the 'Create Policy' button
   - Element: **Create Policy** (button) — top-right corner
   - Notes: Ensure you are in the correct region if multi-region support is enabled.

4. Select the policy type as 'Custom Policy'
   - Element: **Custom Policy** (radio) — policy type selection section

5. Enter a name and description for the policy
   - Element: **Policy Name** (text_input) — main content area
   - Notes: Use a descriptive name such as 'AutoScalingReadOnly'.

6. Define the policy statement using JSON format
   - Element: **Policy Document** (text_input) — main content area
   - Notes: Include actions like 'autoscaling:DescribeScalingGroups', 'autoscaling:DescribeInstances', etc., and specify resource ARNs.

7. Click 'Create' to finalize the policy
   - Element: **Create** (button) — bottom of form
   - Notes: The policy will now be available for attachment to users or roles.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Policy Name | text | Yes | — | A unique name for the access control policy. |
| Description | text | No | — | Optional description to explain the purpose of the policy. |
| Policy Type | radio | Yes | System Policy, Custom Policy | Choose whether to use a predefined system policy or create a custom one. |
| Policy Document | text | Yes | — | JSON-formatted policy document defining allowed actions and resources. |

### Adjust Instance Count

**Navigation**: Console > Elastic Compute Service > Auto Scaling > Scaling Groups

**Prerequisites**:
- An existing scaling group must be created
- Basic understanding of ECS instances and monitoring metrics
- Permission to create and manage scaling rules and tasks

1. Navigate to the Auto Scaling section in the ECS console
   - Element: **Auto Scaling** (menu) — left navigation panel

2. Select the target scaling group from the list
   - Element: **Scaling Groups** (tab) — main content area

3. Click on 'Create Scaling Rule' to set up a new rule
   - Element: **Create Scaling Rule** (button) — top-right corner
   - Notes: Choose between 'Simple Scaling Rule' or 'Target Tracking Scaling Rule' based on your scenario.

4. Configure the trigger condition (e.g., CPU utilization ≥ 70%)
   - Element: **Trigger Condition** (text_input) — main content area
   - Notes: For scheduled tasks, select 'Scheduled Task' and set the time (e.g., 17:55).

5. Set the number of instances to add or remove
   - Element: **Number of Instances** (text_input) — main content area
   - Notes: Ensure this value aligns with your capacity planning needs.

6. Enable health checks for continuous instance monitoring
   - Element: **Health Check** (checkbox) — Scaling Group Settings
   - Notes: This ensures automatic replacement of unhealthy instances.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Scaling Rule Type | dropdown | Yes | Simple Scaling Rule, Target Tracking Scaling Rule | Determines how the scaling behavior is defined — either by fixed thresholds or by maintaining a target metric. |
| Trigger Condition | dropdown | Yes | CPU Utilization, Network In, Network Out, Disk Read Bytes, Disk Write Bytes | The metric that triggers the scaling action. |
| Threshold | number | Yes | — | The value at which the scaling rule activates (e.g., 70% for CPU utilization). |
| Action | dropdown | Yes | Add Instances, Remove Instances, Set Min Size | The action to take when the threshold is met. |
| Number of Instances | number | Yes | — | How many instances to add or remove during the scaling action. |

### Configure Scaling Policies

**Navigation**: Console > Auto Scaling > Scaling Groups

**Prerequisites**:
- Auto Scaling must be activated in the selected region
- The scaling group must be of type ECS (not ECI)

1. Log on to the Auto Scaling console
   - Element: **Log on to the Auto Scaling console** (link) — top navigation bar

2. Click on the Scaling Groups menu
   - Element: **Scaling Groups** (menu) — left navigation pane

3. Select the region where Auto Scaling is activated
   - Element: **region selector** (dropdown) — top navigation bar

4. Find the target scaling group and click Modify
   - Element: **Modify** (button) — Operations column

5. Set the Multi-AZ Policy to the desired option and configure child items if needed
   - Element: **Multi-AZ Policy** (dropdown) — Configuration form
   - Notes: If selecting Balanced Distribution, ensure vSwitches are configured in multiple zones. For Cost Optimization or Custom Combination, configure related child settings.

6. Click Confirm to save changes
   - Element: **Confirm** (button) — bottom of form

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Multi-AZ Policy | dropdown | Yes | Priority, Balanced Distribution, Cost Optimization, Custom Combination | Determines how instances are distributed across zones and how spot and pay-as-you-go capacity is balanced during scale-out/in events. |
| BalanceMode | dropdown | No | BalancedBestEffort, BalancedOnly | Controls fallback behavior when instance creation fails in a zone. 'BalancedBestEffort' falls back to another zone; 'BalancedOnly' does not. |
| AutoRebalance | toggle | No | true, false | Enables automatic detection and correction of zone imbalances. Only effective when BalanceMode is set to BalancedOnly. |
| OnDemandBaseCapacity | number | No | — | The minimum number of pay-as-you-go instances the scaling group must maintain. Pay-as-you-go instances are created first if the current count falls below this value. |
| OnDemandPercentageAboveBaseCapacity | number | No | — | The percentage of pay-as-you-go instances among automatically created instances that exceed the minimum count. |
| SpotInstancePools | number | No | — | The number of lowest-priced instance types used when creating spot instances. Spot instances are distributed evenly across these types. |
| SpotInstanceRemedy | toggle | No | true, false | When enabled, creates a replacement spot instance approximately 5 minutes before scheduled reclamation to reduce interruption risk. |
| CompensateWithOnDemand | toggle | No | true, false | When enabled, creates pay-as-you-go instances to meet required capacity if spot capacity cannot be met due to pricing or inventory. |
| SpotAutoReplaceOnDemand | toggle | No | true, false | When enabled, automatically replaces excess pay-as-you-go instances with spot instances when spot capacity becomes available. |
| AzBalance | toggle | No | true, false | When enabled, distributes ECS instances evenly across all configured zones. Requires multiple vSwitches. |
| AllocationStrategy | dropdown | No | priority, lowestPrice | Determines how instance types are selected. 'priority' uses configured order; 'lowestPrice' uses ascending vCPU unit price order. |
| SpotAllocationStrategy | dropdown | No | priority, lowestPrice | A separate allocation strategy for spot instances. Applies only when SpotAllocationStrategy switch is enabled. |

### Manage Scaling Configurations

**Navigation**: Console > ECS > Auto Scaling > Scaling Groups > [Group] > Instance Configuration Sources

**Prerequisites**:
- A scaling group with at least one scaling configuration
- Permissions to manage scaling configurations in the Auto Scaling console

1. Log on to the Auto Scaling console
   - Element: **Auto Scaling console** (link) — top navigation bar

2. Click the Scaling Groups tab in the left-side navigation pane
   - Element: **Scaling Groups** (menu) — left-side navigation panel

3. Select a region from the top navigation bar
   - Element: **region dropdown** (dropdown) — top navigation bar

4. Find the scaling group and click the Details button in the Operations column
   - Element: **Details** (button) — main content area

5. Click the Instance Configuration Sources tab
   - Element: **Instance Configuration Sources** (tab) — main content area

6. Find the scaling configuration and click Enable in the Operations column
   - Element: **Enable** (button) — main content area

7. Click OK in the confirmation dialog
   - Element: **OK** (button) — confirmation dialog

8. Click Modify in the Operations column
   - Element: **Modify** (button) — main content area

9. Update parameters on the Modify Configuration page
   - Element: **Modify Configuration** (link) — main content area

10. Click Confirm in the Preview dialog
    - Element: **Confirm** (button) — preview dialog

11. Click Delete in the Operations column
    - Element: **Delete** (button) — main content area

12. Click OK in the confirmation message
    - Element: **OK** (button) — confirmation dialog

13. Click Export Scaling Configuration
    - Element: **Export Scaling Configuration** (button) — main content area

14. Click Import Scaling Configuration
    - Element: **Import Scaling Configuration** (button) — main content area

15. Click Choose File and select the .json file
    - Element: **Choose File** (button) — file upload section

16. Select configurations to import in the preview section
    - Element: **configuration checkboxes** (checkbox) — preview section

17. Optionally check the suffix checkbox to avoid name conflicts
    - Element: **suffix checkbox** (checkbox) — import options

18. Click Start Upload and confirm completion
    - Element: **Start Upload** (button) — upload section

### Manage Notifications

**Navigation**: Console > ECS > Auto Scaling > Event Notifications

**Prerequisites**:
- MNS topic must be created
- MNS queue must be created
- Topic and queue must be in the same region as the scaling group

1. Navigate to the Auto Scaling console
   - Element: **Auto Scaling** (link) — left navigation panel

2. Click on the 'Create Event Notification' button
   - Element: **Create Event Notification** (button) — top-right corner

3. Select a notification method from the dropdown
   - Element: **Notification Method** (dropdown) — main content area
   - Notes: Options: Cloud Monitor, MNS Topic, MNS Queue

4. Select one or more event notification types
   - Element: **Event Notification Types** (checkbox) — main content area
   - Notes: Available types include scale-out success, scale-in error, scheduled task expiring, etc.

5. Click the Confirm button to save the configuration
   - Element: **Confirm** (button) — bottom of the form

6. Find the event notification to modify and click Modify
   - Element: **Modify** (button) — Action column

7. On the Modify page, update the event notification types and confirm
   - Element: **Confirm** (button) — bottom of the form

8. Find the event notification to delete and click Delete
   - Element: **Delete** (button) — Action column

9. Click OK in the confirmation dialog box
   - Element: **OK** (button) — confirmation dialog

10. Click the accepter link to view associated messages
    - Element: **Accepter Link** (link) — Notification Mode column
    - Notes: Opens the linked Cloud Monitor, MNS topic, or MNS queue page

11. View messages in Cloud Monitor, MNS topic, or MNS queue
    - Element: **Number of Messages / Active Messages** (text_input) — table columns
    - Notes: Check for increases in message counts; use 'Receive Message' to view details

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Notification Method | dropdown | Yes | Cloud Monitor, MNS Topic, MNS Queue | Specifies where the event notification will be sent |
| Event Notification Types | checkbox | No | Scale-Out Success, Scale-In Success, Scale-Out Error, Scale-In Error, Scale-Reject, Scale-Out Start, Scale-In Start, Scheduled Task Expiring, Scaling Group Diagnose, Scale-Out Warn, Scale-In Warn | Selects which scaling events trigger the notification |

### Optimize Costs

**Navigation**: Console > ECS > Auto Scaling > Scaling Groups > [Group] > Configuration

**Prerequisites**:
- VPC already created
- ECS instance type must be compatible with cloud disks (not local disk types like d1, d1ne, ga1, gn5, i1, i2)
- Scaling group type must be ECS
- Network type must be VPC

1. Select Economical Mode for the instance reclaim mode during scaling group creation
   - Element: **Recycle** (dropdown) — Scaling policy configuration section

2. View the number of stopped ECS instances in the scaling group
   - Element: **Instances tab** (tab) — Scaling group details page
   - Notes: The count is only displayed if there are stopped instances in the group.

3. Filter the list of ECS instances to show only those in the Stopped state
   - Element: **Filter icon** (button) — Lifecycle State column header
   - Notes: Click the filter icon and select 'Stopped' from the dropdown.

4. Click on the ID of a stopped ECS instance to view its details
   - Element: **Instance ID** (link) — Main instance list table

5. Check the instance details to confirm that the stopped mode is set to 'Stopped (No charge)'
   - Element: **Other Information section** (section) — Instance detail tab
   - Notes: This confirms that compute resources are no longer charged, but storage and network resources continue to incur charges.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Reclaim Mode | dropdown | Yes | Release, Recycle | Determines how resources are handled during scale-in. Select 'Recycle' to enable Economical Mode. |

### Integrate with Other Services

**Navigation**: Console > Auto Scaling > Scaling Groups > [Group] > Modify

**Prerequisites**:
- A Classic Load Balancer (CLB) instance in the 'Running' state
- The CLB instance and scaling group must be in the same region
- The CLB instance must have at least one listener configured with health checks enabled
- If both are VPC-type, they must be in the same VPC
- Quota for load balancer instances attached to the scaling group is not exceeded

1. Click Create Scaling Group
   - Element: **Create Scaling Group** (button) — top-right corner

2. Set network type to VPC or Classic Network
   - Element: **VPC** (radio) — main content area

3. Configure the Associate SLB setting
   - Element: **Associate SLB** (checkbox) — main content area

4. Select one or more Classic Load Balancer (CLB) instances
   - Element: **Classic Load Balancer (CLB) instances** (dropdown) — main content area
   - Notes: A scaling group can be associated with a limited number of CLB instances. Check Quota Center if no instances are available.

5. Select a backend server group of the CLB instance
   - Element: **Select backend server group** (dropdown) — main content area
   - Notes: Choose between default server group or vServer group. Default weight is 50 unless specified.

6. Specify the weight for new instances when added to the backend server group
   - Element: **Weight** (text_input) — main content area
   - Notes: Can be set during scaling group creation or in scaling configuration. If set in both, Scenario 1 takes precedence.

7. Click Confirm to complete the scaling group creation
   - Element: **Confirm** (button) — bottom of form

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Associate SLB | checkbox | No | — | Enable association between the scaling group and one or more SLB instances. |
| Select CLB Instances | dropdown | Yes | Classic Load Balancer (CLB) instance 1, Classic Load Balancer (CLB) instance 2 | Choose one or more CLB instances to associate with the scaling group. |
| Select Backend Server Group | dropdown | Yes | Default Server Group, vServer Group | Choose the server group within the CLB instance to which instances will be added. |
| Weight | number | No | — | Set the initial weight for new instances added to the backend server group. Default is 50. |
| When you attach or detach load balancer instances, add existing instances in the scaling group to or remove them from the server groups of the affected load balancer instances. | checkbox | No | — | If selected, existing instances in the scaling group are automatically added to or removed from the server groups of the load balancer instances being attached or detached. |
| Asynchronously Detach or Attach Default Server Group | checkbox | No | — | If selected, a scaling activity is generated each time a default server group is individually attached or detached. |

### Automate Instance Setup

**Navigation**: Console > Auto Scaling > Scaling Groups > [Group] > Application Publishing

**Prerequisites**:
- ECS instances in the scaling group must be Linux-based
- A valid deployment artifact must be created first
- For Docker image deployments, Container Registry (ACR) Enterprise Edition instance is required

1. Click a Scaling Group ID to go to the scaling group details page
   - Element: **Scaling Group ID** (link) — main content area

2. Navigate to the Application Publishing section
   - Element: **Application Publishing** (menu) — left navigation panel

3. Click Create Deployment Artifact
   - Element: **Create Deployment Artifact** (button) — top-right corner

4. Select and configure a deployment artifact type based on your use case
   - Element: **Deployment Artifact Type** (dropdown) — main content area
   - Notes: Options include OSS file, ECS image, Docker image, and Command execution only

5. Configure specific settings based on selected artifact type
   - Element: **Configuration items** (text_input) — main content area
   - Notes: Includes fields like OSS Region, Bucket, Image ID, Container Registry Region, etc.

6. Click Create and Publish or Create Only
   - Element: **Create and Publish** (button) — bottom of form
   - Notes: Clicking this redirects to the deployment configuration page

7. Go to the Application Publishing tab and select Release Deployment
   - Element: **Release Deployment** (link) — top navigation

8. Select the revision of the deployment artifact to publish
   - Element: **Revision ID** (dropdown) — main content area

9. Configure release policy including mode, batch size, and pause options
   - Element: **Release Policy** (text_input) — main content area
   - Notes: Can choose Full release or Canary release; set batch number and pause behavior

10. Enable automatic publishing on scale-out and graceful shutdown on scale-in
    - Element: **Automatic publishing on scale-out** (checkbox) — main content area
    - Notes: Recommended for version consistency and business continuity

11. Click OK to start the release
    - Element: **OK** (button) — bottom of form

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Deployment Artifact Type | dropdown | Yes | OSS file, ECS image, Docker image, Command execution only | Choose how the application source files are stored and deployed |
| OSS Region | dropdown | Yes | — | Select the region where the OSS bucket is located |
| OSS Bucket | dropdown | Yes | — | Select the OSS bucket containing the application files |
| File Path in Bucket | text_input | Yes | — | Enter the path to the application file within the OSS bucket |
| Download over internal network | checkbox | No | — | Enable to improve download speed when ECS and OSS are in the same region |
| Region | dropdown | Yes | — | Select the region of the ECS image (must match scaling group region) |
| Image ID | dropdown | Yes | — | Select a custom image that contains the deployed application |
| Container Registry Region | dropdown | Yes | — | Select the region of the ACR instance |
| Container Registry Instance ID | dropdown | Yes | — | Select the ACR instance from which to pull the Docker image |
| Namespace | text_input | Yes | — | Enter the namespace of the Docker image |
| Image Name | text_input | Yes | — | Enter the name of the Docker image |
| Image Version | text_input | Yes | — | Enter the version of the Docker image |
| Pull over internal network | checkbox | No | — | Enable to pull the image over an internal network if in the same VPC |
| Working Directory | text_input | Yes | /home/admin | Specify the directory where scripts will execute |
| Release Mode | radio | Yes | Full release, Canary release | Choose whether to deploy to all instances or a subset for validation |
| Batch Number | number | Yes | — | Set the number of instances to release in each batch |
| Batch Mode | dropdown | Yes | No Pause, Pause After First Batch, Pause After Each Batch | Choose when to pause between batches during release |
| Automatic publishing on scale-out | checkbox | No | — | Enable to automatically deploy latest version to new instances during scale-out |
| Graceful shutdown on scale-in | checkbox | No | — | Enable to execute stop script before removing instances during scale-in |

### Manage Permissions

**Navigation**: Console > Auto Scaling > Scaling Groups > Permissions

**Prerequisites**:
- An Auto Scaling group must already be created
- RAM role with appropriate permissions must be configured

1. Navigate to the Auto Scaling console
   - Element: **Auto Scaling** (menu) — left navigation panel

2. Select the target scaling group from the list
   - Element: **Scaling Groups** (menu) — left navigation panel

3. Click on the 'Permissions' tab
   - Element: **Permissions** (tab) — main content area

4. Assign a RAM role to the scaling group
   - Element: **Assign Role** (button) — top-right corner
   - Notes: Select a role from the dropdown list. The role must have necessary permissions for instance lifecycle management.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Select RAM Role | dropdown | Yes | AliyunECSFullAccess, AliyunECSReadOnlyAccess, CustomRole | Choose the RAM role that defines the permissions for the scaling group to manage instances. |

### Vertical Scaling

**Navigation**: Console > Elastic Compute Service (ECS) > Auto Scaling > Vertical Scaling

**Prerequisites**:
- RAM role configured for OOS service with permissions to manage ECS and Auto Scaling resources
- Instance must be a pay-as-you-go instance
- Instance type must belong to the same instance family when upgrading/downgrading

1. Navigate to the Vertical Scaling page
   - Element: **Vertical Scaling** (link) — left navigation panel

2. Click Create Vertical Scaling Task button
   - Element: **Create Vertical Scaling Task** (button) — upper-left corner of the page

3. Configure the task parameters on the form
   - Element: **Create Vertical Scaling Task** (panel) — main content area

4. Click Create button to submit the task
   - Element: **Create** (button) — bottom of the form

5. Find the target task in the list and click View Details
   - Element: **View Details** (button) — Operations column
   - Notes: You can view execution logs, results, and progress on different tabs: Historical Executions, Upcoming Runs, and Execution Log.

6. Click Clone in the Operations column
   - Element: **Clone** (button) — Operations column

7. Modify the configuration and click Create
   - Element: **Create** (button) — bottom of the form

8. Find a pending task and click Cancel
   - Element: **Cancel** (button) — Operations column

9. Find a completed or canceled task and click Delete
   - Element: **Delete** (button) — Operations column

10. Confirm deletion in the dialog box
    - Element: **OK** (button) — dialog box

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Scaling Action | dropdown | Yes | Upgrade instance type, Downgrade instance type | The type of scaling action to perform. Upgrade increases computing power; downgrade reduces it. |
| Target Instance | text_input | Yes | — | The instance that this task will scale. |
| Target Instance Type | text_input | Yes | — | The target instance type. For upgrades, specify up to 10 types in ascending order. For downgrades, specify up to 5 types in descending order. |
| Trigger Type | radio | Yes | One-time execution, Periodic execution, Threshold-triggered execution | How the task is triggered. One-time: execute once at a specific time. Periodic: repeat based on cron expression. Threshold: trigger when a CloudMonitor metric exceeds a threshold. |
| RAM Role | dropdown | Yes | Create new RAM role, Select existing role (e.g., OOSServiceRole) | The RAM role that OOS uses to execute the task. Must have permissions to manage ECS and Auto Scaling resources. |
| Description | text_input | No | — | Optional description to help identify and manage the task. |
| Tags | text_input | No | — | Optional tags to help organize and manage the task. |

### Monitor and Diagnose

**Navigation**: Console > ECS > Auto Scaling > Scaling Groups > [Group] > Activity

**Prerequisites**:
- A scaling group must exist
- At least one scaling activity must have been executed

1. Click the 'Activity' tab at the top of the page
   - Element: **Activity** (tab) — top of the page

2. Find the scaling activity and click its ID in the 'Scaling Activity ID' column
   - Element: **Scaling Activity ID** (link) — in the table under the Activity tab
   - Notes: The image shows an example of the scaling activity result page with status, trigger cause, and instance count information.

## FAQ

Q: Where do I find the scaling group management page?
A: Navigate to Console > ECS > Auto Scaling > Scaling Groups to view and manage your scaling groups.

Q: What happens if I leave the Minimum Number of Instances field empty when creating a scaling group?
A: The field is required and must be set to a value between 0 and the Maximum Number of Instances. Leaving it empty will prevent the scaling group from being created.

Q: Can I modify a scaling group's network type after creation?
A: No, the network type (VPC or Classic) cannot be changed after the scaling group is created. You would need to create a new scaling group with the desired network type.

Q: What permissions do I need to manage scaling groups?
A: You need the AliyunESSFullAccess permission or equivalent custom RAM policy permissions to manage scaling groups, configurations, and rules.

Q: How do I troubleshoot a scaling activity that failed?
A: Navigate to the scaling group's Activity tab, click on the failed activity ID, and review the detailed error message and status information to identify the cause of failure.

## Pricing & Billing

### Billing Model
Auto Scaling itself is free to use. You are only charged for the underlying cloud resources that are managed by Auto Scaling, such as ECS instances, ECI instances, SLB, ApsaraDB RDS, CloudMonitor, and SMQ services. Billing for these resources follows their respective pricing models.

### Price Reference
- **ECS instances**: Billed per instance hour based on instance type and region
- **ECI instances**: Billed per second with a minimum charge of 1 hour
- **Spot instances**: Up to 90% cheaper than pay-as-you-go instances, with prices varying based on market supply and demand
- **Event notifications**: Free to create and manage; MNS topic and queue usage may incur charges based on message volume and storage duration

### Free Tier
- Auto Scaling service: Free to use
- Event-triggered tasks: Monthly free tier of 100 executions
- Scheduled tasks: Monthly free tier of 100 executions
- Message notifications: Monthly free tier of 1000 notifications

### Billing Notes
- Billing starts when an instance is created and stops when it is terminated or released
- Preemptible instances may be stopped earlier than 15 days due to market conditions
- Overdue payments may affect scaling group operations; settle outstanding balances to resume normal functionality
- Resource usage beyond free tier limits is billed according to standard pricing for each service