All Products
Search
Document Center

Elastic Compute Service:Use resource groups for horizontal permission management

Last Updated:Apr 01, 2026

When multiple teams share an Alibaba Cloud account, the default flat-permission model gives every Resource Access Management (RAM) user with AliyunECSFullAccess full access to every Elastic Compute Service (ECS) instance in the account. A Department A administrator can view, modify, or delete Department B's production servers — whether accidentally or intentionally.

Resource groups solve this by creating logical management boundaries within your account. You place each department's ECS instances, disks, images, security groups, key pairs, and vSwitches in a separate resource group, then scope permissions to that group. Each administrator can only see and operate their own department's resources.

By the end of this topic, you will have set up a two-department ECS environment where each department's administrator has full control over their own resources and no visibility into the other's.

Prerequisites

Before you begin, ensure that you have:

Why the default model falls short

Granting AliyunECSFullAccess at the account level gives a RAM user permissions far beyond what their job requires. This violates the principle of least privilege — a core component of defense-in-depth security — and creates three concrete problems:

  • Permission abuse and operational errors: Any ECS administrator can view, modify, or delete resources belonging to any other department.

  • Audit and compliance challenges: When all teams operate under the same flat permission scope, it is difficult to track which department made a specific change.

  • No enforceable boundaries: There is no technical mechanism to prevent accidental cross-department actions.

Resource groups, combined with resource-group-scoped RAM policies, eliminate all three problems without requiring separate Alibaba Cloud accounts.

Set up horizontal permission management

The following steps create two isolated ECS administration environments: DepartmentA and DepartmentB. Each department gets its own resource group, its own RAM user, and permissions scoped exclusively to that group.

Step 1: Create resource groups

  1. Log on to the Resource Group console.

  2. Click Create Resource Group, fill in the following fields, and click OK:

    FieldValue
    Resource Group IdentifierDepartmentA
    Resource Group NameDepartment A Resource Group

  3. Repeat to create a second resource group with the identifier DepartmentB.

Step 2: Create RAM users

  1. Log on to the RAM console. In the left navigation pane, choose Identities > Users.

  2. Click Create User and fill in the following fields:

    FieldValue
    Logon Name/Display NameAdminA
    Access ModeConsole Access

  3. Configure the password policy and click OK. Complete the security authentication as prompted.

  4. Repeat to create a second user named AdminB.

Step 3: Grant permissions to each resource group

  1. Return to the Resource Group console.

  2. Find the DepartmentA resource group and click Manage Permission in the Actions column.

  3. Click Grant Permission and configure the following:

    FieldValue
    Resource ScopeDepartmentA (current resource group, default)
    PrincipalRAM User — select AdminA
    PolicyAliyunECSFullAccess and AliyunBSSFullAccess

  4. Click OK.

  5. Repeat to grant the same policies to AdminB for the DepartmentB resource group.

Step 4: Verify the isolation

  1. Log out of your current account.

  2. Log on to the Alibaba Cloud Management Console as AdminA.

  3. Create a custom instance. For the resource group, select Department A Resource Group.

  4. Go to the ECS console - Instances. Confirm that only the instances in the DepartmentA resource group are visible.

  5. Log out and repeat as AdminB. Confirm that AdminB sees only the instances in the DepartmentB resource group and has no visibility into DepartmentA resources.

What's next