Skip to main content
IAM Policy Map

SageMakerStudioBedrockFlowServiceRolePolicy

OperatorService roleActivePermissions reviewedShow on mapCompare

Summary

Allows Amazon Bedrock Flows to access Amazon Bedrock models and other resources attached to a flow in SageMaker Studio.

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

Identity

ARN
arn:aws:iam::aws:policy/service-role/SageMakerStudioBedrockFlowServiceRolePolicy
Default version
v9
Created
Last edited
Services
bedrock, kms, lambda

Control-plane actions (4)

By access level: 2 Read, 2 Write.

Control-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
Bedrock2 of 2322 Read; 2 restricted, 2 conditionalbedrock:GetInferenceProfile, bedrock:GetPrompt
KMS2 of 582 Write; 2 restricted, 2 conditionalkms:Decrypt, kms:GenerateDataKey
Bedrock: 2 actions
  • bedrock:GetInferenceProfile (Read)
  • bedrock:GetPrompt (Read)
KMS: 2 actions
  • kms:Decrypt (Write)
  • kms:GenerateDataKey (Write)

Data-plane actions (6)

By access level: 4 Read, 2 Write.

Data-plane actions by service
ServiceGrantedAccess levels and limitsGranted by
Bedrock5 of 374 Read, 1 Write; 4 restricted, 4 conditionalbedrock:ApplyGuardrail, bedrock:InvokeAgent, bedrock:InvokeModel, bedrock:Retrieve, bedrock:RetrieveAndGenerate
Lambda1 of 141 Write; 1 restricted, 1 conditionallambda:InvokeFunction
Bedrock: 5 actions
  • bedrock:ApplyGuardrail (Read)
  • bedrock:InvokeAgent (Read)
  • bedrock:InvokeModel (Read)
  • bedrock:Retrieve (Read)
  • bedrock:RetrieveAndGenerate (Write)
Lambda: 1 actions
  • lambda:InvokeFunction (Write)

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 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": "BedrockPromptPermissions",
      "Effect": "Allow",
      "Action": "bedrock:GetPrompt",
      "Resource": "arn:aws:bedrock:*:*:prompt/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}",
          "aws:ResourceTag/AmazonDataZoneProject": "${aws:PrincipalTag/AmazonDataZoneProject}"
        }
      }
    },
    {
      "Sid": "BedrockKnowledgeBasePermissions",
      "Effect": "Allow",
      "Action": "bedrock:Retrieve",
      "Resource": "arn:aws:bedrock:*:*:knowledge-base/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}",
          "aws:ResourceTag/AmazonDataZoneProject": "${aws:PrincipalTag/AmazonDataZoneProject}"
        }
      }
    },
    {
      "Sid": "BedrockGuardrailPermissions",
      "Effect": "Allow",
      "Action": "bedrock:ApplyGuardrail",
      "Resource": "arn:aws:bedrock:*:*:guardrail/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}",
          "aws:ResourceTag/AmazonDataZoneProject": "${aws:PrincipalTag/AmazonDataZoneProject}"
        }
      }
    },
    {
      "Sid": "AllowBedrockRetrieveAndGeneratePermissions",
      "Effect": "Allow",
      "Action": "bedrock:RetrieveAndGenerate",
      "Resource": "*"
    },
    {
      "Sid": "AllowLambdaInvokeFunctionInProjectPermissions",
      "Effect": "Allow",
      "Action": "lambda:InvokeFunction",
      "Resource": "arn:aws:lambda:*:*:function:amazon-bedrock*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}",
          "aws:ResourceTag/AmazonDataZoneProject": "${aws:PrincipalTag/AmazonDataZoneProject}"
        }
      }
    },
    {
      "Sid": "AllowBedrockApplicationInferenceProfileAccessInProjectPermissions",
      "Effect": "Allow",
      "Action": [
        "bedrock:GetInferenceProfile",
        "bedrock:InvokeModel"
      ],
      "Resource": "arn:aws:bedrock:*:*:application-inference-profile/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceTag/AmazonDataZoneProject": "${aws:PrincipalTag/AmazonDataZoneProject}"
        }
      }
    },
    {
      "Sid": "AllowBedrockInvokeModelAccessWithInferenceProfilePermissions",
      "Effect": "Allow",
      "Action": "bedrock:InvokeModel",
      "Resource": [
        "arn:aws:bedrock:*::foundation-model/*",
        "arn:aws:bedrock:*:*:custom-model/*",
        "arn:aws:bedrock:*:*:provisioned-model/*"
      ],
      "Condition": {
        "Null": {
          "bedrock:InferenceProfileArn": "false"
        }
      }
    },
    {
      "Sid": "BedrockInvokeAgentPermissions",
      "Effect": "Allow",
      "Action": "bedrock:InvokeAgent",
      "Resource": "arn:aws:bedrock:*:*:agent-alias/*",
      "Condition": {
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}",
          "aws:ResourceTag/AmazonDataZoneProject": "${aws:PrincipalTag/AmazonDataZoneProject}"
        }
      }
    },
    {
      "Sid": "BedrockPromptKmsPermissions",
      "Effect": "Allow",
      "Action": [
        "kms:Decrypt",
        "kms:GenerateDataKey"
      ],
      "Resource": "arn:aws:kms:*:*:key/${aws:PrincipalTag/KmsKeyId}",
      "Condition": {
        "StringLike": {
          "kms:ViaService": "bedrock.*.amazonaws.com",
          "kms:EncryptionContext:aws:bedrock-prompts:arn": "arn:aws:bedrock:*:${aws:PrincipalAccount}:prompt/*"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    },
    {
      "Sid": "BedrockGuardrailKmsPermissions",
      "Effect": "Allow",
      "Action": "kms:Decrypt",
      "Resource": "arn:aws:kms:*:*:key/${aws:PrincipalTag/KmsKeyId}",
      "Condition": {
        "StringLike": {
          "kms:ViaService": "bedrock.*.amazonaws.com"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        },
        "Null": {
          "kms:EncryptionContext:aws:bedrock:guardrail-id": "false"
        }
      }
    },
    {
      "Sid": "BedrockAgentKmsPermissions",
      "Effect": "Allow",
      "Action": [
        "kms:Decrypt",
        "kms:GenerateDataKey"
      ],
      "Resource": "arn:aws:kms:*:*:key/${aws:PrincipalTag/KmsKeyId}",
      "Condition": {
        "StringLike": {
          "kms:ViaService": "bedrock.*.amazonaws.com",
          "kms:EncryptionContext:aws:bedrock:arn": "arn:aws:bedrock:*:${aws:PrincipalAccount}:agent/*"
        },
        "StringEquals": {
          "aws:ResourceAccount": "${aws:PrincipalAccount}"
        }
      }
    }
  ]
}

Version history

Current version v9, 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/service-role/SageMakerStudioBedrockFlowServiceRolePolicy
aws iam attach-user-policy --user-name USER_NAME --policy-arn arn:aws:iam::aws:policy/service-role/SageMakerStudioBedrockFlowServiceRolePolicy
aws iam attach-group-policy --group-name GROUP_NAME --policy-arn arn:aws:iam::aws:policy/service-role/SageMakerStudioBedrockFlowServiceRolePolicy

CloudFormation

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

Terraform

resource "aws_iam_role_policy_attachment" "service_role_sagemakerstudiobedrockflowservicerolepolicy" {
  role       = aws_iam_role.example.name
  policy_arn = "arn:aws:iam::aws:policy/service-role/SageMakerStudioBedrockFlowServiceRolePolicy"
}

CDK (TypeScript)

role.addManagedPolicy(
  iam.ManagedPolicy.fromAwsManagedPolicyName("service-role/SageMakerStudioBedrockFlowServiceRolePolicy"),
);

Sources

Pending editorial review. No editorial sources are listed yet.