AmazonDocDBReadOnlyAccess
Summary
Provides read-only access to Amazon DocumentDB with MongoDB compatibility. The reference page notes that this policy also grants access to Amazon RDS and Amazon Neptune resources. The Amazon DocumentDB Developer Guide says principals with it cannot make updates, delete existing resources or create new DocumentDB resources.
Permissions imported from the AWS Managed Policy Reference Guide; other sections reviewed against the listed AWS sources.
Identity
- ARN
arn:aws:iam::aws:policy/AmazonDocDBReadOnlyAccess- Default version
- v1
- Created
- Last edited
- Services
- cloudwatch, ec2, kms, logs, rds
Control-plane actions (33)
By access level: 30 List, 3 Read.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| EC2 | 7 of 834 | 7 List; 0 restricted, 0 conditional | ec2:DescribeAccountAttributes, ec2:DescribeAvailabilityZones, ec2:DescribeInternetGateways, ec2:DescribeSecurityGroups, ec2:DescribeSubnets, ec2:DescribeVpcAttribute, ec2:DescribeVpcs |
| KMS | 4 of 58 | 4 List; 0 restricted, 0 conditional | kms:ListAliases, kms:ListKeyPolicies, kms:ListKeys, kms:ListRetirableGrants |
| CloudWatch Logs | 2 of 133 | 1 List, 1 Read; 2 restricted, 0 conditional | logs:DescribeLogStreams, logs:GetLogEvents |
| RDS | 20 of 173 | 18 List, 2 Read; 0 restricted, 0 conditional | rds:DescribeAccountAttributes, rds:DescribeCertificates, rds:DescribeDBClusterParameterGroups, rds:DescribeDBClusterParameters, rds:DescribeDBClusterSnapshotAttributes, rds:DescribeDBClusterSnapshots, rds:DescribeDBClusters, rds:DescribeDBEngineVersions, rds:DescribeDBInstances, rds:DescribeDBLogFiles, rds:DescribeDBParameterGroups, rds:DescribeDBParameters and 8 more |
EC2: 7 actions
- ec2:DescribeAccountAttributes (List)
- ec2:DescribeAvailabilityZones (List)
- ec2:DescribeInternetGateways (List)
- ec2:DescribeSecurityGroups (List)
- ec2:DescribeSubnets (List)
- ec2:DescribeVpcAttribute (List)
- ec2:DescribeVpcs (List)
KMS: 4 actions
- kms:ListAliases (List)
- kms:ListKeyPolicies (List)
- kms:ListKeys (List)
- kms:ListRetirableGrants (List)
CloudWatch Logs: 2 actions
- logs:DescribeLogStreams (List)
- logs:GetLogEvents (Read)
RDS: 20 actions
- rds:DescribeAccountAttributes (List)
- rds:DescribeCertificates (List)
- rds:DescribeDBClusterParameterGroups (List)
- rds:DescribeDBClusterParameters (List)
- rds:DescribeDBClusterSnapshotAttributes (List)
- rds:DescribeDBClusterSnapshots (List)
- rds:DescribeDBClusters (List)
- rds:DescribeDBEngineVersions (List)
- rds:DescribeDBInstances (List)
- rds:DescribeDBLogFiles (List)
- rds:DescribeDBParameterGroups (List)
- rds:DescribeDBParameters (List)
- rds:DescribeDBSubnetGroups (List)
- rds:DescribeEventCategories (List)
- rds:DescribeEventSubscriptions (List)
- rds:DescribeEvents (List)
- rds:DescribeOrderableDBInstanceOptions (List)
- rds:DescribePendingMaintenanceActions (List)
- rds:DownloadDBLogFilePortion (Read)
- rds:ListTagsForResource (Read)
Data-plane actions (2)
By access level: 1 List, 1 Read.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| CloudWatch | 2 of 5 | 1 List, 1 Read; 0 restricted, 0 conditional | cloudwatch:GetMetricStatistics, cloudwatch:ListMetrics |
CloudWatch: 2 actions
- cloudwatch:GetMetricStatistics (Read)
- cloudwatch:ListMetrics (List)
Excluded and conditional actions
No patterns are excluded by NotAction or Deny statements.
Resource scope and attachment
Resource scope across granted actions: mixed.
Can be attached: Yes, to users, groups and roles.
Why this tier
- Grants only List and Read actions.
Guidance
Practical scope
On Resource "*" the policy allows rds:DescribeAccountAttributes, rds:DescribeCertificates, rds:DescribeDBClusterParameterGroups, rds:DescribeDBClusterParameters, rds:DescribeDBClusterSnapshotAttributes, rds:DescribeDBClusterSnapshots, rds:DescribeDBClusters, rds:DescribeDBEngineVersions, rds:DescribeDBInstances, rds:DescribeDBLogFiles, rds:DescribeDBParameterGroups, rds:DescribeDBParameters, rds:DescribeDBSubnetGroups, rds:DescribeEventCategories, rds:DescribeEventSubscriptions, rds:DescribeEvents, rds:DescribeOrderableDBInstanceOptions, rds:DescribePendingMaintenanceActions, rds:DownloadDBLogFilePortion and rds:ListTagsForResource. It also allows cloudwatch:GetMetricStatistics, cloudwatch:ListMetrics, seven ec2 Describe actions, and kms:ListKeys, kms:ListRetirableGrants, kms:ListAliases and kms:ListKeyPolicies. logs:DescribeLogStreams and logs:GetLogEvents are allowed only on log streams in log groups under /aws/rds/ and /aws/docdb/.
Use cases
- Let users view the list of Amazon DocumentDB clusters and their configurations without being able to change them.
Best practices
- AWS managed policies don't grant least privilege permissions. The IAM User Guide suggests using IAM Access Analyzer to see which permissions principals actually use, then writing a custom policy or generating one with only the required permissions.
Security considerations
- The policy has no create, update or delete actions, but its actions use the rds, cloudwatch, ec2, kms and logs prefixes. The reference description says it also grants access to Amazon RDS and Amazon Neptune resources.
- rds:DownloadDBLogFilePortion on Resource "*" and logs:GetLogEvents let principals read database log content. Only the two logs actions are limited to log groups under /aws/rds/ and /aws/docdb/.
- You cannot change the permissions in an AWS managed policy. If AWS updates the policy, the update affects every user, group and role it is attached to.
Assignment guidance
You can attach this policy to your users, groups and roles. The reference page also links to guidance on creating a permission set using AWS managed policies in IAM Identity Center. It fits where read-only visibility of DocumentDB clusters and their configuration is intended.
Related policies
Same service
- AdministratorAccess-AWSElasticBeanstalk
- AgentRegistryFullAccess
- AIDevOpsReleaseManagementVPCPolicy
- AmazonAppFlowFullAccess
- AmazonAppStreamServiceAccess
- AmazonAuroraDSQLConsoleFullAccess
- AmazonAuroraDSQLFullAccess
- AmazonBioDiscoveryServiceLinkedRolePolicy
Same domain
Frequently asked questions
- When should I attach AmazonDocDBReadOnlyAccess?
- The Amazon DocumentDB Developer Guide says it allows users to view information in Amazon DocumentDB. Attach it where viewing clusters and configurations, without changing them, is the intended scope.
- What does AmazonDocDBReadOnlyAccess grant?
- On all resources it allows rds Describe actions, rds:DownloadDBLogFilePortion and rds:ListTagsForResource, two CloudWatch metric read actions, seven EC2 Describe actions and four KMS list actions. It allows logs:DescribeLogStreams and logs:GetLogEvents only on log streams under /aws/rds/ and /aws/docdb/.
- What are the security risks of AmazonDocDBReadOnlyAccess?
- The policy grants no write actions, but the reference description says it also grants access to Amazon RDS and Amazon Neptune resources, and it allows reading database log content. An AWS update to the policy affects every identity it is attached to.
Policy JSON
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"rds:DescribeAccountAttributes",
"rds:DescribeCertificates",
"rds:DescribeDBClusterParameterGroups",
"rds:DescribeDBClusterParameters",
"rds:DescribeDBClusterSnapshotAttributes",
"rds:DescribeDBClusterSnapshots",
"rds:DescribeDBClusters",
"rds:DescribeDBEngineVersions",
"rds:DescribeDBInstances",
"rds:DescribeDBLogFiles",
"rds:DescribeDBParameterGroups",
"rds:DescribeDBParameters",
"rds:DescribeDBSubnetGroups",
"rds:DescribeEventCategories",
"rds:DescribeEventSubscriptions",
"rds:DescribeEvents",
"rds:DescribeOrderableDBInstanceOptions",
"rds:DescribePendingMaintenanceActions",
"rds:DownloadDBLogFilePortion",
"rds:ListTagsForResource"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Action": [
"cloudwatch:GetMetricStatistics",
"cloudwatch:ListMetrics"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Action": [
"ec2:DescribeAccountAttributes",
"ec2:DescribeAvailabilityZones",
"ec2:DescribeInternetGateways",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSubnets",
"ec2:DescribeVpcAttribute",
"ec2:DescribeVpcs"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Action": [
"kms:ListKeys",
"kms:ListRetirableGrants",
"kms:ListAliases",
"kms:ListKeyPolicies"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Action": [
"logs:DescribeLogStreams",
"logs:GetLogEvents"
],
"Effect": "Allow",
"Resource": [
"arn:aws:logs:*:*:log-group:/aws/rds/*:log-stream:*",
"arn:aws:logs:*:*:log-group:/aws/docdb/*:log-stream:*"
]
}
]
}
Version history
Current version v1, edited by AWS on 2019-01-09. Version history is recorded from 2026-11-11. Earlier versions are in the IAM console under Policy versions.
Attach snippets
AWS CLI
aws iam attach-role-policy --role-name ROLE_NAME --policy-arn arn:aws:iam::aws:policy/AmazonDocDBReadOnlyAccess
aws iam attach-user-policy --user-name USER_NAME --policy-arn arn:aws:iam::aws:policy/AmazonDocDBReadOnlyAccess
aws iam attach-group-policy --group-name GROUP_NAME --policy-arn arn:aws:iam::aws:policy/AmazonDocDBReadOnlyAccessCloudFormation
Resources:
ExampleRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument: {} # replace with your trust policy
ManagedPolicyArns:
- arn:aws:iam::aws:policy/AmazonDocDBReadOnlyAccessTerraform
resource "aws_iam_role_policy_attachment" "amazondocdbreadonlyaccess" {
role = aws_iam_role.example.name
policy_arn = "arn:aws:iam::aws:policy/AmazonDocDBReadOnlyAccess"
}CDK (TypeScript)
role.addManagedPolicy(
iam.ManagedPolicy.fromAwsManagedPolicyName("AmazonDocDBReadOnlyAccess"),
);Sources
- AmazonDocDBReadOnlyAccess (AWS Managed Policy Reference Guide) (retrieved ; supports summary, practicalScope, securityConsiderations, assignmentGuidance, faqs)
- AWS managed policies for Amazon DocumentDB (retrieved ; supports summary, useCases, faqs)
- Managed policies and inline policies (IAM User Guide) (retrieved ; supports securityConsiderations, faqs)
- AWS managed policies for job functions (IAM User Guide) (retrieved ; supports bestPractices)