ApsaraDB RDS uses service-linked roles to access other Alibaba Cloud services on your behalf. Each role carries a predefined policy with the minimum permissions needed for specific features. This page covers the three service-linked roles that ApsaraDB RDS supports, including their permissions and how to delete them.
| Role | Used for |
|---|---|
AliyunServiceRoleForRds | ApsaraDB RDS for MySQL |
AliyunServiceRoleForRdsPgsqlOnEcs | ApsaraDB RDS for PostgreSQL |
AliyunServiceRoleForRDSProxyOnEcs | Database proxy feature of ApsaraDB RDS for PostgreSQL |
A service-linked role is a RAM role. For background on RAM roles and service-linked roles, see Service-linked roles.
AliyunServiceRoleForRds
Attached policy: AliyunServiceRolePolicyForRds
Used for: ApsaraDB RDS for MySQL
Permissions
Create the role
You can create this role in the console when you create the database. For details, see Create a database.
Delete the role
Delete all databases that depend on this role before deleting the role itself.
To delete an ApsaraDB RDS for MySQL database, see Delete a database.
To delete the service-linked role, see Service-linked roles.
AliyunServiceRoleForRdsPgsqlOnEcs
Attached policy: AliyunServiceRolePolicyForRdsPgsqlOnEcs
Used for: ApsaraDB RDS for PostgreSQL
Permissions
Create the role
You can perform SLR authorization in the console when you create the RDS for PostgreSQL instance. For details, see Create an ApsaraDB RDS for PostgreSQL instance.
Delete the role
Release all instances associated with this role before deleting the role itself.
To release an ApsaraDB RDS for PostgreSQL instance, see Release or unsubscribe from an ApsaraDB RDS for PostgreSQL instance.
To delete the service-linked role, see Service-linked roles.
AliyunServiceRoleForRDSProxyOnEcs
Attached policy: AliyunServiceRolePolicyForRDSProxyOnEcs
Used for: Database proxy feature of ApsaraDB RDS for PostgreSQL
Permissions
Create the role
You can create this role in the console when you enable the database proxy feature for your RDS instance. For details, see Enable the database proxy feature.
Delete the role
Disable the database proxy feature before deleting this role.
To disable the database proxy feature, see Disable the database proxy feature.
To delete the service-linked role, see Service-linked roles.
API reference
Use the CreateServiceLinkedRole operation to create a service-linked role programmatically.
Parameter | Description | Example |
RegionId | The ID of the region where the instance resides. Call DescribeRegions to get the list of available regions. |
|
ServiceLinkedRole | The name of the service-linked role. Valid values: |
|