Skip to main content
IAM Policy Map

AWSCodeCommitReadOnly

ReaderAWS managedActivePermissions reviewedShow on mapCompare

Summary

Provides read only access to AWS CodeCommit via the AWS Management Console.

Permissions imported from the AWS Managed Policy Reference Guide; other sections pending editorial review.

Identity

ARN
arn:aws:iam::aws:policy/AWSCodeCommitReadOnly
Default version
v14
Created
Last edited
Services
codecommit, codeguru-reviewer, codestar-connections, codestar-notifications, events, iam, lambda, sns

Control-plane actions (63)

By access level: 22 List, 41 Read.

Control-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
CodeCommit42 of 918 List, 34 Read; 0 restricted, 0 conditionalcodecommit:BatchDescribe*, codecommit:BatchGet*, codecommit:Describe*, codecommit:EvaluatePullRequestApprovalRules, codecommit:Get*, codecommit:GitPull, codecommit:List*
CodeGuru Reviewer4 of 172 List, 2 Read; 0 restricted, 0 conditionalcodeguru-reviewer:DescribeCodeReview, codeguru-reviewer:DescribeRepositoryAssociation, codeguru-reviewer:ListCodeReviews, codeguru-reviewer:ListRepositoryAssociations
CodeStar Connections2 of 381 List, 1 Read; 2 restricted, 0 conditionalcodestar-connections:GetConnection, codestar-connections:ListConnections
CodeStar Notifications4 of 133 List, 1 Read; 1 restricted, 1 conditionalcodestar-notifications:DescribeNotificationRule, codestar-notifications:ListEventTypes, codestar-notifications:ListNotificationRules, codestar-notifications:ListTargets
EventBridge2 of 711 List, 1 Read; 2 restricted, 0 conditionalevents:DescribeRule, events:ListTargetsByRule
IAM5 of 1904 List, 1 Read; 4 restricted, 0 conditionaliam:GetSSHPublicKey, iam:ListAccessKeys, iam:ListSSHPublicKeys, iam:ListServiceSpecificCredentials, iam:ListUsers
Lambda1 of 1211 List; 0 restricted, 0 conditionallambda:ListFunctions
SNS3 of 402 List, 1 Read; 0 restricted, 0 conditionalsns:GetTopicAttributes, sns:ListSubscriptionsByTopic, sns:ListTopics
CodeCommit: 42 actions
  • codecommit:BatchDescribeMergeConflicts (Read)
  • codecommit:BatchGetCommits (Read)
  • codecommit:BatchGetPullRequests (Read)
  • codecommit:BatchGetRepositories (Read)
  • codecommit:DescribeMergeConflicts (Read)
  • codecommit:DescribePullRequestEvents (Read)
  • codecommit:EvaluatePullRequestApprovalRules (Read)
  • codecommit:GetApprovalRuleTemplate (Read)
  • codecommit:GetBlob (Read)
  • codecommit:GetBlobDifferences (Read)
  • codecommit:GetBranch (Read)
  • codecommit:GetComment (Read)
  • codecommit:GetCommentReactions (Read)
  • codecommit:GetCommentsForComparedCommit (Read)
  • codecommit:GetCommentsForPullRequest (Read)
  • codecommit:GetCommit (Read)
  • codecommit:GetCommitHistory (Read)
  • codecommit:GetCommitsFromMergeBase (Read)
  • codecommit:GetDifferences (Read)
  • codecommit:GetFile (Read)
  • codecommit:GetFolder (Read)
  • codecommit:GetMergeCommit (Read)
  • codecommit:GetMergeConflicts (Read)
  • codecommit:GetMergeOptions (Read)
  • codecommit:GetObjectIdentifier (Read)
  • codecommit:GetPullRequest (Read)
  • codecommit:GetPullRequestApprovalStates (Read)
  • codecommit:GetPullRequestOverrideState (Read)
  • codecommit:GetReferences (Read)
  • codecommit:GetRepository (Read)
  • codecommit:GetRepositoryTriggers (Read)
  • codecommit:GetTree (Read)
  • codecommit:GetUploadArchiveStatus (Read)
  • codecommit:GitPull (Read)
  • codecommit:ListApprovalRuleTemplates (List)
  • codecommit:ListAssociatedApprovalRuleTemplatesForRepository (List)
  • codecommit:ListBranches (List)
  • codecommit:ListFileCommitHistory (List)
  • codecommit:ListPullRequests (List)
  • codecommit:ListRepositories (List)
  • codecommit:ListRepositoriesForApprovalRuleTemplate (List)
  • codecommit:ListTagsForResource (List)
CodeGuru Reviewer: 4 actions
  • codeguru-reviewer:DescribeCodeReview (Read)
  • codeguru-reviewer:DescribeRepositoryAssociation (Read)
  • codeguru-reviewer:ListCodeReviews (List)
  • codeguru-reviewer:ListRepositoryAssociations (List)
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: 2 actions
  • events:DescribeRule (Read)
  • events:ListTargetsByRule (List)
IAM: 5 actions
  • iam:GetSSHPublicKey (Read)
  • iam:ListAccessKeys (List)
  • iam:ListSSHPublicKeys (List)
  • iam:ListServiceSpecificCredentials (List)
  • iam:ListUsers (List)
Lambda: 1 actions
  • lambda:ListFunctions (List)
SNS: 3 actions
  • sns:GetTopicAttributes (Read)
  • sns:ListSubscriptionsByTopic (List)
  • sns:ListTopics (List)

Data-plane actions (0)

By access level: none.

This policy grants no actions in this plane.

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.

Same service

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

Download policy.json

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "codecommit:BatchGet*",
        "codecommit:BatchDescribe*",
        "codecommit:Describe*",
        "codecommit:EvaluatePullRequestApprovalRules",
        "codecommit:Get*",
        "codecommit:List*",
        "codecommit:GitPull"
      ],
      "Resource": "*"
    },
    {
      "Sid": "CloudWatchEventsCodeCommitRulesReadOnlyAccess",
      "Effect": "Allow",
      "Action": [
        "events:DescribeRule",
        "events:ListTargetsByRule"
      ],
      "Resource": "arn:aws:events:*:*:rule/codecommit*"
    },
    {
      "Sid": "SNSSubscriptionAccess",
      "Effect": "Allow",
      "Action": [
        "sns:ListTopics",
        "sns:ListSubscriptionsByTopic",
        "sns:GetTopicAttributes"
      ],
      "Resource": "*"
    },
    {
      "Sid": "LambdaReadOnlyListAccess",
      "Effect": "Allow",
      "Action": [
        "lambda:ListFunctions"
      ],
      "Resource": "*"
    },
    {
      "Sid": "IAMReadOnlyListAccess",
      "Effect": "Allow",
      "Action": [
        "iam:ListUsers"
      ],
      "Resource": "*"
    },
    {
      "Sid": "IAMReadOnlyConsoleAccess",
      "Effect": "Allow",
      "Action": [
        "iam:ListSSHPublicKeys",
        "iam:ListServiceSpecificCredentials",
        "iam:ListAccessKeys",
        "iam:GetSSHPublicKey"
      ],
      "Resource": "arn:aws:iam::*:user/${aws:username}"
    },
    {
      "Sid": "CodeStarConnectionsReadOnlyAccess",
      "Effect": "Allow",
      "Action": [
        "codestar-connections:ListConnections",
        "codestar-connections:GetConnection"
      ],
      "Resource": "arn:aws:codestar-connections:*:*:connection/*"
    },
    {
      "Sid": "CodeStarNotificationsReadOnlyAccess",
      "Effect": "Allow",
      "Action": [
        "codestar-notifications:DescribeNotificationRule"
      ],
      "Resource": "*",
      "Condition": {
        "ArnLike": {
          "codestar-notifications:NotificationsForResource": "arn:aws:codecommit:*:*:*"
        }
      }
    },
    {
      "Sid": "CodeStarNotificationsListAccess",
      "Effect": "Allow",
      "Action": [
        "codestar-notifications:ListNotificationRules",
        "codestar-notifications:ListEventTypes",
        "codestar-notifications:ListTargets"
      ],
      "Resource": "*"
    },
    {
      "Sid": "AmazonCodeGuruReviewerReadOnlyAccess",
      "Effect": "Allow",
      "Action": [
        "codeguru-reviewer:DescribeRepositoryAssociation",
        "codeguru-reviewer:ListRepositoryAssociations",
        "codeguru-reviewer:DescribeCodeReview",
        "codeguru-reviewer:ListCodeReviews"
      ],
      "Resource": "*"
    }
  ]
}

Version history

Current version v14, 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/AWSCodeCommitReadOnly
aws iam attach-user-policy --user-name USER_NAME --policy-arn arn:aws:iam::aws:policy/AWSCodeCommitReadOnly
aws iam attach-group-policy --group-name GROUP_NAME --policy-arn arn:aws:iam::aws:policy/AWSCodeCommitReadOnly

CloudFormation

Resources:
  ExampleRole:
    Type: AWS::IAM::Role
    Properties:
      AssumeRolePolicyDocument: {}  # replace with your trust policy
      ManagedPolicyArns:
        - arn:aws:iam::aws:policy/AWSCodeCommitReadOnly

Terraform

resource "aws_iam_role_policy_attachment" "awscodecommitreadonly" {
  role       = aws_iam_role.example.name
  policy_arn = "arn:aws:iam::aws:policy/AWSCodeCommitReadOnly"
}

CDK (TypeScript)

role.addManagedPolicy(
  iam.ManagedPolicy.fromAwsManagedPolicyName("AWSCodeCommitReadOnly"),
);

Sources

Pending editorial review. No editorial sources are listed yet.