All Products
Search
Document Center

ApsaraDB RDS:Authorize a RAM user to manage ApsaraDB RDS instances

Last Updated:Mar 28, 2026

Use Resource Access Management (RAM) to grant a RAM user the permissions needed to manage ApsaraDB RDS instances. This lets you control exactly which RDS operations each RAM user can perform—without sharing your Alibaba Cloud account credentials.

For example, if you grant a RAM user the permission to call the CreateDBInstance operation, the RAM user can create an RDS instance in the ApsaraDB RDS console. The following procedure demonstrates granting permission to view RDS instance information.

Prerequisites

Before you begin, ensure that you have:

Best practices

Grant only the permissions a RAM user needs for their role. For example, a monitoring engineer typically needs only read permissions (rds:Describe*), not write permissions. Applying least-privilege permissions reduces the impact if credentials are compromised.

For fine-grained access control, RAM authorization supports:

  • ARN-based authorization — scope permissions to a specific instance, region, or account

  • Resource group-based authorization — manage permissions by resource group

  • Tag-based authorization — control access using resource tags

For an example of granting read-only access to a single instance, see Grant a RAM user the read-only permissions on a specific ApsaraDB RDS instance.

Grant RDS permissions to a RAM user

The following example grants a RAM user permission to view RDS instance information (rds:Describe*). Other permissions follow the same pattern.

Step 1: Create a policy

  1. Log on to the RAM console.

  2. In the left-side navigation pane, choose Permissions > Policies.

  3. Click Create Policy.

  4. Choose a policy creation mode:

    • Visual editor — fill in a form to build the policy

    • JSON — write the policy document directly (more efficient for complex policies)

Visual editor

Configure the following parameters:

ParameterDescription
EffectSelect Allow to grant the permissions.
ServiceSelect ApsaraDB RDS/RDS.
ActionSelect the API operations to allow. To grant read-only access, select all Read actions. Include DescribeDBInstances — without it, the RAM user cannot view the instance list. If the policy document exceeds the length limit due to a large number of selected actions, submit a ticket to increase the limit.
ResourceSelect All resource(s)(*) to apply to all instances, or select Specified resource(s) to scope by Alibaba Cloud Resource Name (ARN). See the ARN reference below.
Condition(Optional) Add constraints such as restricting the source IP addresses from which the RAM user can log on. See Policy elements.

ARN formats for specified resources

Configure the ARNs tagged as Required to make sure the policy works as expected. Without acs:rds:*:{#accountId}:dbinstance/*, the RAM user cannot view instances in the instance list.

ARN formatScopeRequired
acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}Region + account + instance IDYes
acs:rds:{#regionId}:{#accountId}:dbinstance/*Region + accountNo
acs:rds:*:{#accountId}:dbinstance/*AccountYes
acs:rds:*:{#accountId}:dbinstance/{#dbinstanceId}Account + instance IDYes
选择操作

JSON

Paste the following policy document into the code editor:

{
    "Version": "1",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": "rds:Describe*",
            "Resource": "*"
        }
    ]
}

The policy has a single statement with three fields:

  • Effect: Allow grants the specified permissions.

  • Action: rds:Describe* matches all RDS API operations starting with Describe, covering all read operations. Adjust to the specific operations your use case requires.

  • Resource: * applies to all RDS resources in the account. Replace with a specific ARN to scope the permissions further.

JSON mode is more efficient than the visual editor when you need to match multiple operations by prefix (for example, rds:Describe*) or copy an existing policy document.

  1. Click OK. In the Create Policy dialog box, enter a Policy Name and an optional Description, then click OK.

Step 2: Attach the policy to the RAM user

  1. In the left-side navigation pane, choose Identities > Users.

  2. Find the RAM user, then click Add Permissions in the Actions column.

  3. In the Policy section, select Custom Policy from the drop-down list.

  4. Find and select the policy created in Step 1, then click OK.

  5. Click Grant permissions.

Verify the configuration

Log on to the ApsaraDB RDS console using the RAM user's credentials and confirm that the user can view the RDS instance list. If the instance list is empty or inaccessible, check that the policy includes DescribeDBInstances and that the required resource ARNs are configured.

What's next