IAM policy example: invoke Bedrock models with streaming, with a least privilege rewrite
Facts read 16 Nov 2026. Page reviewed 16 Nov 2026.
Allows a role to call InvokeModel and InvokeModelWithResponseStream on two named foundation models and to list the available models. The original uses a wildcard resource on all foundation models, so a new model is allowed on release. The names and the account ID 111122223333 are AWS documentation placeholders.
Open the workbench ยท All examples
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "InvokeAnyModel",
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream"
],
"Resource": "arn:aws:bedrock:*::foundation-model/*"
},
{
"Sid": "ListModels",
"Effect": "Allow",
"Action": "bedrock:ListFoundationModels",
"Resource": "*"
}
]
}
What it allows
- Allows invoking any foundation model in any Region, with or without streaming, and listing models.
What it allows
Allow 2 actions (bedrock:InvokeModel, bedrock:InvokeModelWithResponseStream) on arn:aws:bedrock:*::foundation-model/*.
Action or pattern Actions Access levels bedrock:InvokeModel1 Read 1 bedrock:InvokeModelWithResponseStream1 Read 1 Allow 1 action (bedrock:ListFoundationModels) on every resource.
Action or pattern Actions Access levels bedrock:ListFoundationModels1 List 1
Checks
No flags from the six checks.
New models become callable the day they appear in the account, before anyone has reviewed cost or data handling.
Least privilege rewrite
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "InvokeTwoModels",
"Effect": "Allow",
"Action": [
"bedrock:InvokeModel",
"bedrock:InvokeModelWithResponseStream"
],
"Resource": [
"arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-3-haiku-20240307-v1:0",
"arn:aws:bedrock:us-east-1::foundation-model/amazon.titan-text-express-v1"
]
},
{
"Sid": "ListModels",
"Effect": "Allow",
"Action": "bedrock:ListFoundationModels",
"Resource": "*"
}
]
}
The rewrite names two model ARNs in one Region. A new model needs a policy change before anyone can call it.
What it allows
Allow 2 actions (bedrock:InvokeModel, bedrock:InvokeModelWithResponseStream) on arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-3-haiku-20240307-v1:0, arn:aws:bedrock:us-east-1::foundation-model/amazon.titan-text-express-v1.
Action or pattern Actions Access levels bedrock:InvokeModel1 Read 1 bedrock:InvokeModelWithResponseStream1 Read 1 Allow 1 action (bedrock:ListFoundationModels) on every resource.
Action or pattern Actions Access levels bedrock:ListFoundationModels1 List 1
Checks
No flags from the six checks.
Related pages
Sources
- Amazon Bedrock User Guide: identity-based policy examples, read 16 Nov 2026
- AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026), read 16 Nov 2026
Last reviewed 16 Nov 2026.