# ecs-cloud-assistant

Part of **ECS**

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

> 💡 **Path Selection**: This skill is one implementation path for [Execute remote commands on ECS instances](../../intent/ecs-execute-instances/SKILL.md). If you're unsure which path to take, check the routing skill first.

# ECS Cloud Assistant Console Guide

## Operations Overview

| Operation | Console Navigation Path | Prerequisites | Description |
|------|-----------|---------|------|
| Clone Command | Console > Cloud Assistant > Commands > Clone Command | User must have permissions: Operations Administrator, Organization Administrator, or Resource Set Administrator; An existing Cloud Assistant command must be available to clone | Duplicate an existing Cloud Assistant command with modified settings such as name, description, execution plan, type, content, path, and timeout period. |
| Execute Commands Remotely | Console > ECS > Instances > Cloud Assistant | ECS instance must have Cloud Assistant Agent installed; Instance must be in Running state; User must have appropriate RAM permissions (e.g., AliyunECSCloudAssistantAccess) | Run commands on ECS instances remotely using Cloud Assistant through a secure, agent-based interface without requiring direct SSH or RDP access. |
| Configure DNS for Cloud Assistant | Console > ECS > Instances > Configure DNS Resolution for Cloud Assistant | An ECS instance must be running; Access to the ECS instance via SSH or console; Knowledge of the region ID where the instance is located | Set up DNS resolution for Cloud Assistant on ECS instances by modifying the hosts file with specific IP addresses for Cloud Assistant endpoints. |
| Configure Cloud Assistant Client | Console > ECS > Instances > Configure Cloud Assistant Client | An ECS instance must be running; The instance must have network access to the Cloud Assistant service | Configure the Cloud Assistant client on an ECS instance to enable remote management and automation tasks. |
| Install Cloud Assistant Client | Console > ECS > Instances > Install Cloud Assistant Client | Administrator account with root access for Linux instances or system access for Windows instances; Instance type and operating system must support Cloud Assistant | Install the Cloud Assistant client on ECS instances running Windows or Linux operating systems. |
| Start or Stop Cloud Assistant Client | Console > ECS > Instances > Start/Stop Cloud Assistant Client | Access to the ECS instance via remote connection; Administrative privileges on the instance | Control the running state of the Cloud Assistant client on Windows and Linux ECS instances. |
| Create and Run Cloud Assistant Command | Console > ECS > Cloud Assistant > Create Command | Instances must be in Running state; User must have operations administrator, organization administrator, or resource set administrator permissions; Command size after Base64 encoding must not exceed 16 KB; Up to 20 custom parameters can be specified per command; Maximum of 50 instances can be targeted per command run | Create and execute commands using Cloud Assistant on Elastic Compute Service (ECS) instances using the ECS console or CLI. |
| Delete Cloud Assistant Command | Console > ECS > Cloud Assistant > Commands > Delete Command | User must have administrative privileges (operations administrator, organization administrator, or resource set administrator) | Remove a previously created Cloud Assistant command to manage your command quota effectively. |
| Run Cloud Assistant Command | Console > ECS > Cloud Assistant > Commands > Run Command | Instances must be in Running state; Cloud Assistant client must be installed on instances; Only operations administrators, organization administrators, and resource set administrators can run commands | Execute a Cloud Assistant command on target instances using either the ECS console or Alibaba Cloud CLI. |
| Upload File to Instance | Console > ECS > Cloud Assistant > Send File | The ECS instances to which you want to upload a file are in the Running (Running) state; The Cloud Assistant client is installed on the instance; You can call an API operation to send a file to up to 50 instances at a time; The file that you want to upload cannot exceed 32 KB in size after it is encoded in Base64 | Transfer files to ECS instances using the Cloud Assistant client to upload configuration files and scripts. |

## Operation Steps

### Clone Command

**Navigation**: Console > Cloud Assistant > Commands > Clone Command

**Prerequisites**:
- User must have permissions: Operations Administrator, Organization Administrator, or Resource Set Administrator
- An existing Cloud Assistant command must be available to clone

1. Find the Cloud Assistant command that you want to clone and click **Clone** in the Actions column.
   - Element: **Clone** (button) — location: Actions column

2. On the Clone Command page, configure the parameters described in the following table.
   - Element: **Clone Command** (page_title) — location: top of the page

3. Select the organization to which the instances belong.
   - Element: **Organization** (dropdown) — location: Resource Owner section

4. Select the resource set to which the instances belong.
   - Element: **Resource Set** (dropdown) — location: Resource Owner section

5. Specify a name for the new command.
   - Element: **Command Name** (text_input) — location: Command Information section

6. Select a plan on how to run the new command: Run Now, Run on Next System Startup, or Run on Each System Startup.
   - Element: **Run Now** (radio) — location: Execution Plan options

7. Select a command type based on the target instance OS: Shell for Linux, Bat or PowerShell for Windows.
   - Element: **Shell** (radio) — location: Command type options

8. Enter or paste the content of the command.
   - Element: **Command Content** (text_input) — location: Command Information section

9. Specify a description for the new command.
   - Element: **Command Description** (text_input) — location: Command Information section
   - Notes: We recommend setting a descriptive purpose to aid identification and management.

10. Specify an execution path for the new command. Default paths vary by OS.
    - Element: **Execution Path** (text_input) — location: Command Information section
    - Notes: For Linux: /home; For Windows: C:\ProgramData\aliyun\assist\$(version)

11. Set a timeout period for the command (in seconds). Minimum is 10, default is 60.
    - Element: **Timeout Period** (number) — location: Command Information section
    - Notes: If value < 10, system auto-sets to 10.

12. Click **Save** to complete the cloning process.
    - Element: **Save** (button) — location: bottom of the page

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Organization | dropdown | No | — | Select the organization to which the instances belong. |
| Resource Set | dropdown | No | — | Select the resource set to which the instances belong. |
| Command Name | text_input | Yes | — | Specify a name for the new command. |
| Execution Plan | radio | Yes | Run Now, Run on Next System Startup, Run on Each System Startup | Select a plan on how to run the new command. |
| Command type | radio | Yes | Shell, Bat, PowerShell | Select a command type based on the operating system of the target instances. |
| Command Content | text_input | Yes | — | Enter or paste the content of the command. |
| Command Description | text_input | No | — | Specify a description for the new command. We recommend including the command purpose. |
| Execution Path | text_input | No | — | Specify an execution path for the new command. Defaults vary by OS. |
| Timeout Period | number | No | — | Specify a timeout period for the command to run on instances. Minimum: 10 seconds. |

### Execute Commands Remotely

**Navigation**: Console > ECS > Instances > Cloud Assistant

**Prerequisites**:
- ECS instance must have Cloud Assistant Agent installed
- Instance must be in Running state
- User must have appropriate RAM permissions (e.g., AliyunECSCloudAssistantAccess)

1. Navigate to the ECS console and select the target instance
   - Element: **Instances** (link) — location: left navigation panel

2. Click on the **Cloud Assistant** tab under the instance details
   - Element: **Cloud Assistant** (tab) — location: top navigation bar of instance details page

3. Click the **Execute Command** button to open the command execution form
   - Element: **Execute Command** (button) — location: top-right corner of the Cloud Assistant panel

4. Enter the command or script in the command input field
   - Element: **Command Input** (text_input) — location: main content area
   - Notes: Maximum length: 8192 characters

5. Select the execution mode (one-time or scheduled)
   - Element: **Execution Mode** (dropdown) — location: form section
   - Notes: Scheduled execution requires cron expression format

6. Click **OK** to submit the command
   - Element: **OK** (button) — location: bottom-right corner of modal

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Command | text_input | Yes | — | The shell command or script to execute on the target instance |
| Execution Mode | dropdown | Yes | One-time, Scheduled | Determines whether the command runs immediately or at a later time |
| Cron Expression | text_input | No | — | Used only when Execution Mode is Scheduled; defines the schedule using standard cron syntax |
| Timeout (seconds) | number | No | — | Maximum time allowed for command execution before being terminated |

### Configure DNS for Cloud Assistant

**Navigation**: Console > ECS > Instances > Configure DNS Resolution for Cloud Assistant

**Prerequisites**:
- An ECS instance must be running
- Access to the ECS instance via SSH or console
- Knowledge of the region ID where the instance is located

1. Connect to an ECS instance
   - Element: **Connect to Instance** (button) — location: Instance details page
   - Notes: Use SSH or the console's built-in terminal to access the instance.

2. Obtain the IP addresses for Cloud Assistant endpoints
   - Element: **View endpoint details** (link) — location: Documentation section
   - Notes: The endpoints are region-specific. Replace <region-id> with the actual region ID (e.g., cn-hangzhou).

3. Modify the hosts file
   - Element: **Edit /etc/hosts** (text_input) — location: Terminal session
   - Notes: Use the echo command to append entries. Ensure correct IP addresses are used.

4. Verify the hosts file modification
   - Element: **cat /etc/hosts** (button) — location: Terminal session
   - Notes: Check output to confirm that the Cloud Assistant endpoints and their IPs are present.

### Configure Cloud Assistant Client

**Navigation**: Console > ECS > Instances > Configure Cloud Assistant Client

**Prerequisites**:
- An ECS instance must be running
- The instance must have network access to the Cloud Assistant service

1. Click the instance ID in the instance list
   - Element: **Instance ID** (link) — location: Instance list table

2. Navigate to the **Cloud Assistant** tab
   - Element: **Cloud Assistant** (tab) — location: Top navigation panel of the instance details page

3. Click the **Configure** button
   - Element: **Configure** (button) — location: Cloud Assistant section

### Install Cloud Assistant Client

**Navigation**: Console > ECS > Instances > Install Cloud Assistant Client

**Prerequisites**:
- Administrator account with root access for Linux instances or system access for Windows instances
- Instance type and operating system must support Cloud Assistant

1. Click the **ECS Instances** tab to view information about the Cloud Assistant client on the ECS instances within the current region.
   - Element: **ECS Instances** (tab) — location: top navigation panel
   - Notes: An image showing the client state is displayed after clicking this tab.

### Start or Stop Cloud Assistant Client

**Navigation**: Console > ECS > Instances > Start/Stop Cloud Assistant Client

**Prerequisites**:
- Access to the ECS instance via remote connection
- Administrative privileges on the instance

1. Connect to the Windows instance
   - Element: **Start** (menu) — location: Start menu

2. Open Computer Management
   - Element: **Windows Administrative Tools** (menu) — location: Start menu > Windows Administrative Tools

3. Navigate to Services
   - Element: **Computer Management (Local)** (menu) — location: Left navigation panel

4. Stop or restart Aliyun Assist Service
   - Element: **Stop the service** (button) — location: Main content area
   - Notes: Screenshot shows the service status interface with 'Restart the service' button highlighted.

### Create and Run Cloud Assistant Command

**Navigation**: Console > ECS > Cloud Assistant > Create Command

**Prerequisites**:
- Instances must be in Running state
- User must have operations administrator, organization administrator, or resource set administrator permissions
- Command size after Base64 encoding must not exceed 16 KB
- Up to 20 custom parameters can be specified per command
- Maximum of 50 instances can be targeted per command run

1. Click **Create /Run Command** on the ECS Cloud Assistant page
   - Element: **Create /Run Command** (button) — location: top of the Cloud Assistant page

2. Configure command parameters on the Create Command page
   - Element: **Create Command** (link) — location: main content area
   - Notes: Parameters include Resource Owner, Command Information (Name, Type, Content, Use Parameters, etc.), User, Execution Path, Timeout Period, and Instances.

3. Click **Save**, **Run and Save**, or **Run** to execute the command
   - Element: **Save** (button) — location: bottom of the form
   - Notes: Choosing 'Run' executes the command immediately; 'Run and Save' saves it for future use.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Organization | dropdown | Yes | — | Select the organization to which the instances belong. |
| Resource Set | dropdown | Yes | — | Select the resource set to which the instances belong. |
| Command Source | radio | Yes | Enter Command Content, Select Saved Command | Choose whether to create a new command or select an existing one. |
| Command Name | text_input | Yes | — | Enter a name for the command. |
| Execution Plan | radio | Yes | Run Now, Run on Next System Startup, Run on Each System Startup | Define when the command should be executed. |
| Command Type | radio | Yes | Shell, Bat, PowerShell | Select the script type based on the instance OS: Shell for Linux, Bat/PowerShell for Windows. |
| Command Content | text_input | Yes | — | Enter or paste the actual command script. |
| Use Parameters | checkbox | No | — | Enable to use custom parameters in the format {{key}} within the command content. |
| Command Parameters | text_input | No | — | Specify values for custom parameters used in the command content. Only visible when 'Use Parameters' is enabled. |
| Command Description | text_input | No | — | Optional description to help identify and manage the command. |
| User | text_input | No | root (Linux), system (Windows) | Specify the username to run the command on the target instances. |
| Execution Path | text_input | No | /home (Linux), C:\ProgramData\aliyun\assist\$(version) (Windows) | Set the working directory for the command execution. |
| Timeout Period | number | Yes | — | Set the maximum time (in seconds) the command can run before being terminated. Minimum is 10. |
| Instances | text_input | Yes | — | Select the instance(s) on which to run the command by ID or name. |

### Delete Cloud Assistant Command

**Navigation**: Console > ECS > Cloud Assistant > Commands > Delete Command

**Prerequisites**:
- User must have administrative privileges (operations administrator, organization administrator, or resource set administrator)

1. Find the Cloud Assistant command that you want to delete
   - Element: **Delete** (button) — location: Actions column

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

### Run Cloud Assistant Command

**Navigation**: Console > ECS > Cloud Assistant > Commands > Run Command

**Prerequisites**:
- Instances must be in Running state
- Cloud Assistant client must be installed on instances
- Only operations administrators, organization administrators, and resource set administrators can run commands

1. Find the command that you want to run and click **Run** in the Actions column
   - Element: **Run** (button) — location: Actions column

2. In the Run Command page, configure parameters
   - Element: **Run Command** (link) — location: top-level navigation

3. In the Command Information section, check command content and configure parameters
   - Element: **Command Information** (section) — location: main content area

4. In the Command Parameters field, enter values for custom parameters specified in the command
   - Element: **Command Parameters** (text_input) — location: Command Information section
   - Notes: If 'Use Parameters' was not selected when creating the command, this field is not displayed.

5. In the User field, specify the username used to run the command on ECS instances
   - Element: **User** (text_input) — location: Command Information section
   - Notes: Default: root user on Linux, system user on Windows

6. In the Instances section, select one or more instances on which to run the command
   - Element: **Instances** (section) — location: main content area
   - Notes: If more than 50 instances are selected, the system runs the command in batches.

7. Click **Run**
   - Element: **Run** (button) — location: bottom of the form

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Execution Plan | dropdown | No | — | Select a plan on how to run the command. |
| Command Content | text_input | Yes | — | Confirm the command content in the Command Content field. |
| Command Parameters | text_input | No | — | Enter values for custom parameters specified in the command. No format limits apply. |
| User | text_input | No | root on Linux, system on Windows | Specify the username used to run the command on ECS instances. Default: root on Linux, system on Windows. |

### Upload File to Instance

**Navigation**: Console > ECS > Cloud Assistant > Send File

**Prerequisites**:
- The ECS instances to which you want to upload a file are in the Running (Running) state.
- The Cloud Assistant client is installed on the instance.
- You can call an API operation to send a file to up to 50 instances at a time.
- The file that you want to upload cannot exceed 32 KB in size after it is encoded in Base64.

1. Click the **Send File** button on the ECS Cloud Assistant page.
   - Element: **Send File** (button) — location: top-right corner

2. Configure the parameters in the Command Information section.
   - Element: **Command Information** (section) — location: main content area

3. Select the target instances in the Instances section and configure organization, resource set, and instance parameters.
   - Element: **Instances** (section) — location: main content area

4. Click the **Run** button to execute the file upload task.
   - Element: **Run** (button) — location: bottom of the form

5. Click the **File Sending Results** tab to view execution results.
   - Element: **File Sending Results** (tab) — location: top navigation panel

6. View the execution states, execution IDs, and destination paths of file sending tasks.
   - Element: **task list** (table) — location: main content area
   - Notes: You can perform actions like View, Export, or Resend on each task.

| Parameter | Type | Required | Options/Values | Description |
|-----------|------|----------|----------------|-------------|
| Destination Operating System | dropdown | Yes | Linux Operation System, Windows Operating System | Select the operating system of the ECS instances. |
| File Content | radio | Yes | Upload File, Paste File Content | Select a method to use to upload the file. |
| File Name | text_input | Yes | — | Specify a name for the file. |
| Destination Path | text_input | Yes | — | Specify the destination path to save the file. |
| File Description | text_input | No | — | Specify a description for the file. |
| User | text_input | No | — | Specify the user to which the file belongs. Required only for Linux instances. |
| User Group | text_input | No | — | Specify the user group to which the file belongs. Required only for Linux instances. |
| Permissions | text_input | No | 0644 | Configure permissions on the file. Default value: 0644. |
| Overwrite | checkbox | No | — | Specify whether to overwrite the file that has the same name as the uploaded file in the destination path. |
| Timeout Period | number | No | — | Set the timeout period for the file sending task. Valid values: 10 to 86400 seconds. |
| Organization | dropdown | Yes | — | Select the organization to which the file belongs. |
| Resource Set | dropdown | Yes | — | Select the resource set to which the file belongs. |
| Instance | dropdown | Yes | — | Select the instances to which you want to send the file. |

## FAQ

Q: Where do I find the Cloud Assistant feature in the ECS console?
A: Navigate to Console > ECS > Instances, select your target instance, and then click the Cloud Assistant tab under the instance details page.

Q: What happens if I leave the Command Parameters field empty when running a command?
A: If the original command was created without the 'Use Parameters' option enabled, the Command Parameters field will not be displayed. If it was enabled but you leave it empty, the command will run with empty parameter values, which may cause errors depending on how the command uses those parameters.

Q: Can I modify a Cloud Assistant command after creation?
A: You cannot directly edit an existing command. However, you can clone the command to create a new version with modified settings, or delete the original and create a new one from scratch.

Q: What permissions do I need to use Cloud Assistant features?
A: You need to be an Operations Administrator, Organization Administrator, or Resource Set Administrator to create, run, clone, or delete Cloud Assistant commands. Additionally, your ECS instances must have the Cloud Assistant agent installed and be in the Running state.

Q: How do I verify that the Cloud Assistant client is properly installed on my instance?
A: In the ECS console, navigate to Console > ECS > Instances, click on your instance ID, and then go to the Cloud Assistant tab. The client status will be displayed, showing whether it's installed and running properly.

## Pricing & Billing

### Billing Model
Cloud Assistant commands are billed on a per-request basis. Each command execution counts as one request, regardless of success or failure.

### Price Reference
| Tier | Price |
|------|-------|
| Cloud Assistant Commands | 0.001 / |

### Free Tier
Monthly free tier includes 100 command invocations.

### Billing Notes
- Commands are billed per execution, even if they fail or time out
- File upload operations are billed separately at 0.001 /
- Commands created via immediate execution (without saving) do not count toward the 100-command retention quota
- Quotas may increase based on your overall ECS usage