All Products
Search
Document Center

Key Management Service:Regular service role

Last Updated:Sep 08, 2026

To create and manage RAM secrets in KMS, you must create the regular service role AliyunKMSManagedRAMCrendentialsRole and attach the AliyunKMSManagedRAMCrendentialsRolePolicy permission policy. This topic describes how to create, view, and delete AliyunKMSManagedRAMCrendentialsRole.

Overview

A regular service role is a type of RAM role that a trusted Alibaba Cloud service can assume for cross-service authorization. For more information, see RAM role overview.

Using the RAM secret feature of KMS requires the following regular service role and its associated system permission policy:

  • Regular service role: AliyunKMSManagedRAMCrendentialsRole

  • System permission policy: AliyunKMSManagedRAMCrendentialsRolePolicy

Use cases

Before you manage RAM secrets, you must grant KMS permissions to manage the AccessKeys of RAM users. For more information, see Manage and use RAM secrets.

Permissions for RAM users

If you use a RAM user to create or delete a regular service role, you must contact an administrator to grant the RAM user administrator permissions (AliyunKMSFullAccess) or add the following permissions for the RAM user in the Action statement of a custom policy:

  • Create a regular service role: ram:CreateRole

  • Delete a regular service role: ram:DeleteRole

{
    "Action": [
        "ram:CreateRole",
        "ram:DeleteRole"
    ],
    "Resource": "*",
    "Effect": "Allow",
    "Condition": {
        "StringEquals": {
            "ram:ServiceName": "keystore.kms.aliyuncs.com"
        }
     }
}

For more information about authorization, see Permissions required to manage service-linked roles and Grant permissions to a RAM user.

Create a regular service role

When you create a RAM secret, the system checks whether the AliyunKMSManagedRAMCrendentialsRole role already exists in your account. If the role does not exist, a prompt appears. After you confirm the information in the prompt, the system automatically creates the AliyunKMSManagedRAMCrendentialsRole role and attaches the AliyunKMSManagedRAMCrendentialsRolePolicy permission policy to the role.

AliyunKMSManagedRAMCrendentialsRolePolicy permissions

{
    "Version": "1",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "ram:ListAccessKeys",
                "ram:CreateAccessKey",
                "ram:DeleteAccessKey",
                "ram:UpdateAccessKey"
            ],
            "Resource": "*"
        }
    ]
}
Note

You can also customize the policy to manage the AccessKeys of specific RAM users.

View a regular service role

After the regular service role is created, you can search for AliyunKMSManagedRAMCrendentialsRole on the Roles page of the RAM console to view its details.

  • Basic information

    The Basic Information section on the role details page shows the role's name, creation time, ARN, and description.

  • Permission policy

    On the Permissions tab of the role details page, click the name of a permission policy to view its content and the cloud resources that the role can access.

  • Trust policy

    On the Trust Policy Management tab of the role details page, you can view the trust policy, which defines the trusted entities that can assume the RAM role. For a regular service role, the trusted entity is a cloud service, specified in the Service field of the policy.

For more information, see View the information about a RAM role.

Delete a regular service role

Important

If you delete a regular service role, any features that depend on it will stop working. Proceed with caution.

If you no longer use KMS for an extended period, you can manually delete the regular service role in the RAM console. For detailed instructions, see Delete a RAM role.

Before deleting the AliyunKMSManagedRAMCrendentialsRole role, ensure you no longer need it to manage RAM secrets.