AWSCodeBuildReadOnlyAccess
Summary
Provides read only access to AWS CodeBuild via the AWS Management Console. Also attach AmazonS3ReadOnlyAccess to provide access to download build artifacts.
Permissions imported from the AWS Managed Policy Reference Guide; other sections pending editorial review.
Identity
- ARN
arn:aws:iam::aws:policy/AWSCodeBuildReadOnlyAccess- Default version
- v15
- Created
- Last edited
- Services
- cloudwatch, codebuild, codecommit, codestar-connections, codestar-notifications, events, logs
Control-plane actions (42)
By access level: 24 List, 18 Read.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| CodeBuild | 29 of 67 | 18 List, 11 Read; 0 restricted, 0 conditional | codebuild:BatchGet*, codebuild:DescribeCodeCoverages, codebuild:DescribeTestCases, codebuild:GetResourcePolicy, codebuild:List* |
| CodeCommit | 3 of 91 | 3 Read; 0 restricted, 0 conditional | codecommit:GetBranch, codecommit:GetCommit, codecommit:GetRepository |
| CodeStar Connections | 2 of 38 | 1 List, 1 Read; 2 restricted, 0 conditional | codestar-connections:GetConnection, codestar-connections:ListConnections |
| CodeStar Notifications | 4 of 13 | 3 List, 1 Read; 1 restricted, 1 conditional | codestar-notifications:DescribeNotificationRule, codestar-notifications:ListEventTypes, codestar-notifications:ListNotificationRules, codestar-notifications:ListTargets |
| EventBridge | 3 of 71 | 2 List, 1 Read; 0 restricted, 0 conditional | events:DescribeRule, events:ListRuleNamesByTarget, events:ListTargetsByRule |
| CloudWatch Logs | 1 of 133 | 1 Read; 0 restricted, 0 conditional | logs:GetLogEvents |
CodeBuild: 29 actions
- codebuild:BatchGetBuildBatches (Read)
- codebuild:BatchGetBuilds (Read)
- codebuild:BatchGetCommandExecutions (Read)
- codebuild:BatchGetFleets (Read)
- codebuild:BatchGetProjects (Read)
- codebuild:BatchGetReportGroups (Read)
- codebuild:BatchGetReports (Read)
- codebuild:BatchGetSandboxes (Read)
- codebuild:DescribeCodeCoverages (Read)
- codebuild:DescribeTestCases (Read)
- codebuild:GetResourcePolicy (Read)
- codebuild:ListBuildBatches (List)
- codebuild:ListBuildBatchesForProject (List)
- codebuild:ListBuilds (List)
- codebuild:ListBuildsForProject (List)
- codebuild:ListCommandExecutionsForSandbox (List)
- codebuild:ListConnectedOAuthAccounts (List)
- codebuild:ListCuratedEnvironmentImages (List)
- codebuild:ListFleets (List)
- codebuild:ListProjects (List)
- codebuild:ListReportGroups (List)
- codebuild:ListReports (List)
- codebuild:ListReportsForReportGroup (List)
- codebuild:ListRepositories (List)
- codebuild:ListSandboxes (List)
- codebuild:ListSandboxesForProject (List)
- codebuild:ListSharedProjects (List)
- codebuild:ListSharedReportGroups (List)
- codebuild:ListSourceCredentials (List)
CodeCommit: 3 actions
- codecommit:GetBranch (Read)
- codecommit:GetCommit (Read)
- codecommit:GetRepository (Read)
CodeStar Connections: 2 actions
- codestar-connections:GetConnection (Read)
- codestar-connections:ListConnections (List)
CodeStar Notifications: 4 actions
- codestar-notifications:DescribeNotificationRule (Read)
- codestar-notifications:ListEventTypes (List)
- codestar-notifications:ListNotificationRules (List)
- codestar-notifications:ListTargets (List)
EventBridge: 3 actions
- events:DescribeRule (Read)
- events:ListRuleNamesByTarget (List)
- events:ListTargetsByRule (List)
CloudWatch Logs: 1 actions
- logs:GetLogEvents (Read)
Data-plane actions (1)
By access level: 1 Read.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| CloudWatch | 1 of 5 | 1 Read; 0 restricted, 0 conditional | cloudwatch:GetMetricStatistics |
CloudWatch: 1 actions
- cloudwatch:GetMetricStatistics (Read)
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
Pending editorial review. The permission data on this page comes straight from AWS; this section will be filled in once a reviewed guide exists.
Related policies
Same service
- AWSCodeBuildAdminAccess
- AWSCodeBuildDeveloperAccess
- AWSCodeStarServiceRole
- AWSProtonCodeBuildProvisioningServiceRolePolicy
Same domain
Frequently asked questions
Pending editorial review. The permission data on this page comes straight from AWS; this section will be filled in once a reviewed guide exists.
Policy JSON
{
"Statement": [
{
"Sid": "AWSServicesAccess",
"Action": [
"codebuild:BatchGet*",
"codebuild:GetResourcePolicy",
"codebuild:List*",
"codebuild:DescribeTestCases",
"codebuild:DescribeCodeCoverages",
"codecommit:GetBranch",
"codecommit:GetCommit",
"codecommit:GetRepository",
"cloudwatch:GetMetricStatistics",
"events:DescribeRule",
"events:ListTargetsByRule",
"events:ListRuleNamesByTarget",
"logs:GetLogEvents"
],
"Effect": "Allow",
"Resource": "*"
},
{
"Sid": "CodeStarConnectionsUserAccess",
"Effect": "Allow",
"Action": [
"codestar-connections:ListConnections",
"codestar-connections:GetConnection"
],
"Resource": [
"arn:aws:codestar-connections:*:*:connection/*",
"arn:aws:codeconnections:*:*:connection/*"
]
},
{
"Sid": "CodeStarNotificationsPowerUserAccess",
"Effect": "Allow",
"Action": [
"codestar-notifications:DescribeNotificationRule"
],
"Resource": "*",
"Condition": {
"ArnLike": {
"codestar-notifications:NotificationsForResource": "arn:aws:codebuild:*:*:project/*"
}
}
},
{
"Sid": "CodeStarNotificationsListAccess",
"Effect": "Allow",
"Action": [
"codestar-notifications:ListNotificationRules",
"codestar-notifications:ListEventTypes",
"codestar-notifications:ListTargets"
],
"Resource": "*"
}
],
"Version": "2012-10-17"
}
Version history
Current version v15, edited by AWS on 2026-02-12. 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/AWSCodeBuildReadOnlyAccess
aws iam attach-user-policy --user-name USER_NAME --policy-arn arn:aws:iam::aws:policy/AWSCodeBuildReadOnlyAccess
aws iam attach-group-policy --group-name GROUP_NAME --policy-arn arn:aws:iam::aws:policy/AWSCodeBuildReadOnlyAccessCloudFormation
Resources:
ExampleRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument: {} # replace with your trust policy
ManagedPolicyArns:
- arn:aws:iam::aws:policy/AWSCodeBuildReadOnlyAccessTerraform
resource "aws_iam_role_policy_attachment" "awscodebuildreadonlyaccess" {
role = aws_iam_role.example.name
policy_arn = "arn:aws:iam::aws:policy/AWSCodeBuildReadOnlyAccess"
}CDK (TypeScript)
role.addManagedPolicy(
iam.ManagedPolicy.fromAwsManagedPolicyName("AWSCodeBuildReadOnlyAccess"),
);Sources
Pending editorial review. No editorial sources are listed yet.