SageMakerStudioBedrockFlowServiceRolePolicy
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.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| Bedrock | 2 of 232 | 2 Read; 2 restricted, 2 conditional | bedrock:GetInferenceProfile, bedrock:GetPrompt |
| KMS | 2 of 58 | 2 Write; 2 restricted, 2 conditional | kms: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.
| Service | Granted | Access levels and limits | Granted by |
|---|---|---|---|
| Bedrock | 5 of 37 | 4 Read, 1 Write; 4 restricted, 4 conditional | bedrock:ApplyGuardrail, bedrock:InvokeAgent, bedrock:InvokeModel, bedrock:Retrieve, bedrock:RetrieveAndGenerate |
| Lambda | 1 of 14 | 1 Write; 1 restricted, 1 conditional | lambda: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.
Related policies
Same service
- AgentRegistryFullAccess
- AmazonAppFlowFullAccess
- AmazonAuroraDSQLConsoleFullAccess
- AmazonAuroraDSQLFullAccess
- AmazonBedrockAgentCoreMemoryBedrockModelInferenceExecutionRolePolicy
- AmazonBedrockFullAccess
- AmazonBedrockLimitedAccess
- AmazonBedrockMarketplaceAccess
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
{
"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/SageMakerStudioBedrockFlowServiceRolePolicyCloudFormation
Resources:
ExampleRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument: {} # replace with your trust policy
ManagedPolicyArns:
- arn:aws:iam::aws:policy/service-role/SageMakerStudioBedrockFlowServiceRolePolicyTerraform
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.