Limitations
Lists RAM quotas and how to request a quota increase.
|
Category |
Quota |
Limit |
Adjustable |
|
RAM user |
RAM users per Alibaba Cloud account |
5000 |
No |
|
Characters in a RAM user name |
64 |
No |
|
|
Groups per RAM user |
10 |
No |
|
|
AccessKey pairs per RAM user |
2 |
No |
|
|
MFA devices per RAM user |
1 |
No |
|
|
System policies per RAM user |
20 |
Yes (Apply for a quota) |
|
|
Custom policies per RAM user |
10 |
Yes (Apply for a quota) |
|
|
Tags per RAM user |
20 |
No |
|
|
RAM user group |
RAM user groups per Alibaba Cloud account |
300 |
No |
|
Characters in a RAM user group name |
64 |
No |
|
|
System policies per RAM user group |
20 |
Yes (Apply for a quota) |
|
|
Custom policies per RAM user group |
10 |
Yes (Apply for a quota) |
|
|
RAM role |
RAM roles per Alibaba Cloud account |
1000 |
Yes (Apply for a quota) |
|
Characters in a RAM role name |
64 |
No |
|
|
System policies per RAM role |
20 (can be increased to 40) |
Yes (Apply for a quota) |
|
|
Custom policies per RAM role |
10 (can be increased to 20) |
Yes (Apply for a quota) |
|
|
Default domain name |
Characters in a default domain name (including suffix) |
64 |
No |
|
Policy |
Characters in a policy name |
128 |
No |
|
MFA |
Virtual MFA devices or U2F security keys per Alibaba Cloud account |
5000 |
No |
|
RAM users per security phone number |
5 |
No |
|
|
RAM users per email address |
5 |
No |
|
|
Custom policy |
Custom policies per Alibaba Cloud account |
1500 |
Yes (Apply for a quota) |
|
Characters in a custom policy |
6144 |
No |
|
|
Versions per custom policy |
5 |
No |
|
|
Identity provider (IdP) |
SAML IdPs per Alibaba Cloud account |
100 |
No |
|
SAML IdP descriptors per metadata file |
1 |
No |
|
|
Certificates per IdP descriptor in a metadata file |
2 |
No |
|
|
OIDC IdPs per Alibaba Cloud account |
100 |
No |
|
|
Client IDs per OIDC IdP |
20 |
No |
|
|
Fingerprints per OIDC IdP |
5 |
No |
-
Policy attachment quotas for RAM users, RAM user groups, and RAM roles are independent of authorization scope. For example, the quota within a resource group equals the account-wide quota, and they are counted separately.
-
RAM roles prefixed with AliyunReservedSSO are provisioned by CloudSSO when an access configuration is deployed. The limits on the number of attachable custom and system policies for these roles are configured centrally in the CloudSSO console. Limitations of CloudSSO.
Handling quota limits for policies
If the number of policies attached to a RAM role reaches the limit, resolve the issue in the following order.
-
Apply for a quota increase: Go to Quota Center and search for "System policies per RAM role" or "Custom policies per RAM role", then submit an application. You can increase the limit for system policies from 20 to 40 and the limit for custom policies from 10 to 20. The 6,144-character limit on the content of a custom policy cannot be adjusted.
-
Consolidate policies: On the policy management page of the RAM console, click Create Policy, select the Script edit mode, and merge the actions of multiple system policies into a single custom policy. You can use wildcards (such as
oss:Get*) to shorten the action list and reduce the number of characters used.If a quota increase is still insufficient to cover the number of system policies that you need to attach, consolidate policies to further reduce the number of policy slots used. For example, the read-only system policies that you need to attach may still exceed the increased limit of 40. The following custom policy consolidates the read-only permissions of three services:
{ "Version": "1", "Statement": [ { "Effect": "Allow", "Action": [ "apigateway:Describe*", "apigateway:List*", "dts:Describe*", "dts:List*", "ess:Describe*", "ess:List*" ], "Resource": "*" } ] }This example consolidates the read-only permissions of three services into one custom policy, which saves two policy slots compared with attaching three separate read-only system policies. The number of services that a single custom policy can consolidate is not fixed, because it depends on the 6,144-character limit on the content of a custom policy. Evaluate it against the actual length of your action list.
-
Handle the character limit: The content of a custom policy cannot exceed 6,144 characters, and this limit cannot be adjusted. If a consolidated policy exceeds this limit, split it into multiple custom policies, or use wildcards instead of listing individual action names to shorten the content.
-
Coverage of
AliyunReadOnlyAccess:AliyunReadOnlyAccessuses wildcards such as*:Describe*,*:List*,*:Get*, and*:Read*to cover read-only operations. Actions that do not follow this naming convention (such ashbr:BrowseFiles,alikafka:DashboardList,actiontrail:Lookup*,dm:Desc*, andhbr:Search*) are not covered automatically and must be added separately in a custom policy. If a wildcard-based policy does not grant the expected access, use the Policy Simulator to check how a specific action is evaluated. This helps you determine whether the action name does not match the wildcard or whether the action is explicitly denied. RAM evaluates a Deny statement in any effective policy before an Allow statement. Therefore, an action is still denied if a Deny statement applies to it, even when a wildcard matches the action. -
Use a single all-product read-only policy instead of one policy per product: To grant a RAM user read-only access to all Alibaba Cloud products, attach the single
AliyunReadOnlyAccesssystem policy instead of attaching a per-product read-only policy (such asAliyunOSSReadOnlyAccessorAliyunECSReadOnlyAccess) one by one. Attaching one policy per product quickly consumes the system policy quota (20 system policies per RAM user), and attaching another policy after the limit is reached returns aLimitExceeded.User.Policyerror. The singleAliyunReadOnlyAccesspolicy covers read-only operations for most Alibaba Cloud products and occupies only one system policy slot.