Skip to content
Least Privilege Principle

Least privilege for Amazon RDS pairs scoped rds: actions with rds-db:connect on named database users

Amazon RDS has control-plane permissions for managing instances and a separate rds-db:connect action for logging in with IAM database authentication. AWS documentation read on 16 Nov 2026 shows the ARN format that scopes a login to one database account. This guide covers that grant, tags and checks.

Open the calculator ยท All services

RDS permissions cover management actions and database logins

AWS documentation says RDS uses the rds: prefix for management API actions, such as rds:DescribeDBInstances, and the rds-db: prefix only for IAM database authentication. The rds-db:connect action is not valid in any other context.

By default, permission sets and roles cannot create or modify RDS resources, and an administrator must attach policies naming the operations and resources. AWS recommends starting with AWS managed policies and moving to customer managed policies specific to the use case.

The RDS examples page also covers policies to view your own permissions, to create, modify and delete resources, and to use condition keys and custom tags. The DbiResourceId in an rds-db ARN is unique to a Region and never changes, so a policy keeps working if the instance identifier is renamed.

The identities that call this service (people, services, workloads, third parties) are covered in the AWS service identities guide and the workload identities guide.

Account-wide dbuser wildcards and administrator access are the grants to narrow

  • The resource arn:aws:rds-db:us-east-2:111122223333:dbuser:/, which AWS shows as matching all DB instances and database accounts in one account and Region.
  • Administrator permissions in general. AWS says a user with administrator permissions can reach DB instances without explicit permissions in an IAM policy, and suggests a lesser-privileged role for administrators if you want to restrict that.
  • A console policy tighter than the console minimum. AWS says the console will not work as intended for principals whose policy is more restrictive than the minimum permissions.

A database login for one account uses a single rds-db:connect ARN

AWS publishes a policy with one statement. The ARN names the Region, the account, the DB instance resource ID and the database user.

ElementValue from the AWS example
EffectAllow
Actionrds-db:connect
Resourcearn:aws:rds-db:us-east-2:111122223333:dbuser:db-ABCDEFGHIJKL01234/db_user
ARN formatarn:aws:rds-db:region:account-id:dbuser:DbiResourceId/db-user-name
Aurora and proxiesUse DbClusterResourceId for Aurora, or the proxy resource ID such as prx-ABCDEFGHIJKL01234 for RDS Proxy

Conditions, tags and cross-account roles narrow access further

  • Conditions: AWS says a policy condition can require SSL or allow an action only when used through a specific service such as CloudFormation.
  • Tags: AWS describes attribute-based access control with RDS tags in policies, and a policy that grants permission to tag resources at creation.
  • MFA: AWS says to add MFA conditions where IAM users or the root user are required.
  • Cross-account: AWS says to create the role with the connect policy in the DB account and let the other account assume it, because the user must be in the same account as the instance.

Validate the policy and trim it from observed activity

AWS says IAM Access Analyzer validates policies with more than 100 policy checks and gives actionable recommendations. Run it on the rds: and rds-db: statements before attaching them.

IAM Access Analyzer policy generation reviews CloudTrail activity for a role and builds a template from the permissions used, for up to 90 days. That covers roles that call RDS management APIs. AWS notes the generator does not identify action-level activity for data events, so a history of database logins needs database-side logs.

Sources

  1. IAM policy for IAM database access, read 16 Nov 2026
  2. Identity-based policy examples for RDS, read 16 Nov 2026
  3. How RDS works with IAM, read 16 Nov 2026
  4. IAM Access Analyzer policy generation, read 16 Nov 2026

Last reviewed 16 Nov 2026.