Skip to main content
IAM Policy Map

AmazonCodeGuruReviewerServiceRolePolicy

OperatorService-linked roleActivePermissions reviewedShow on mapCompare

Summary

A service-linked role required for Amazon CodeGuru Reviewer to access resources on your behalf.

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

Identity

ARN
arn:aws:iam::aws:policy/aws-service-role/AmazonCodeGuruReviewerServiceRolePolicy
Default version
v4
Created
Last edited
Services
codecommit, codestar-connections, events, s3

Control-plane actions (13)

By access level: 1 List, 8 Read, 1 Tagging, 3 Write.

Control-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
CodeCommit10 of 911 List, 7 Read, 1 Tagging, 1 Write; 10 restricted, 10 conditionalcodecommit:DescribePullRequestEvents, codecommit:GetBranch, codecommit:GetCommentsForPullRequest, codecommit:GetDifferences, codecommit:GetPullRequest, codecommit:GetRepository, codecommit:GitPull, codecommit:ListPullRequests, codecommit:PostCommentForPullRequest, codecommit:UntagResource
CodeStar Connections1 of 381 Read; 1 restricted, 1 conditionalcodestar-connections:UseConnection
EventBridge2 of 712 Write; 2 restricted, 2 conditionalevents:DeleteRule, events:RemoveTargets
CodeCommit: 10 actions
  • codecommit:DescribePullRequestEvents (Read)
  • codecommit:GetBranch (Read)
  • codecommit:GetCommentsForPullRequest (Read)
  • codecommit:GetDifferences (Read)
  • codecommit:GetPullRequest (Read)
  • codecommit:GetRepository (Read)
  • codecommit:GitPull (Read)
  • codecommit:ListPullRequests (List)
  • codecommit:PostCommentForPullRequest (Write)
  • codecommit:UntagResource (Tagging)
CodeStar Connections: 1 actions
  • codestar-connections:UseConnection (Read)
EventBridge: 2 actions
  • events:DeleteRule (Write)
  • events:RemoveTargets (Write)

Data-plane actions (1)

By access level: 1 Read.

Data-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
S31 of 251 Read; 1 restricted, 0 conditionals3:GetObject
S3: 1 actions
  • s3:GetObject (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: No (service-linked role policy).

Why this tier

  • Grants 4 write, tagging or permissions-management actions, short of full control of any service.

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": [
    {
      "Sid": "AccessCodeGuruReviewerEnabledRepositories",
      "Effect": "Allow",
      "Action": [
        "codecommit:GetRepository",
        "codecommit:GetBranch",
        "codecommit:DescribePullRequestEvents",
        "codecommit:GetCommentsForPullRequest",
        "codecommit:GetDifferences",
        "codecommit:GetPullRequest",
        "codecommit:ListPullRequests",
        "codecommit:PostCommentForPullRequest",
        "codecommit:GitPull",
        "codecommit:UntagResource"
      ],
      "Resource": "*",
      "Condition": {
        "StringLike": {
          "aws:ResourceTag/codeguru-reviewer": "enabled"
        }
      }
    },
    {
      "Sid": "AccessCodeGuruReviewerEnabledConnections",
      "Effect": "Allow",
      "Action": [
        "codestar-connections:UseConnection"
      ],
      "Resource": "*",
      "Condition": {
        "ForAllValues:StringEquals": {
          "codestar-connections:ProviderAction": [
            "ListBranches",
            "GetBranch",
            "ListRepositories",
            "ListOwners",
            "ListPullRequests",
            "GetPullRequest",
            "ListPullRequestComments",
            "ListPullRequestCommits",
            "ListCommitFiles",
            "ListBranchCommits",
            "CreatePullRequestDiffComment",
            "GitPull"
          ]
        },
        "Null": {
          "aws:ResourceTag/codeguru-reviewer": "false"
        }
      }
    },
    {
      "Sid": "CloudWatchEventsResourceCleanup",
      "Effect": "Allow",
      "Action": [
        "events:DeleteRule",
        "events:RemoveTargets"
      ],
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "events:ManagedBy": "codeguru-reviewer.amazonaws.com"
        }
      }
    },
    {
      "Sid": "AllowGuruS3GetObject",
      "Effect": "Allow",
      "Action": [
        "s3:GetObject"
      ],
      "Resource": [
        "arn:aws:s3:::codeguru-reviewer-*",
        "arn:aws:s3:::codeguru-reviewer-*/*"
      ]
    }
  ]
}

Version history

Current version v4, edited by AWS on 2020-11-27. Version history is recorded from 2026-11-11. Earlier versions are in the IAM console under Policy versions.

Attach snippets

This policy cannot be attached to users, groups or roles, so there are no attach snippets.

Sources

Pending editorial review. No editorial sources are listed yet.