Skip to content
IAM Policy Generator

IAM policy example: invoke Bedrock models with streaming, with a least privilege rewrite

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

  1. Allow 2 actions (bedrock:InvokeModel, bedrock:InvokeModelWithResponseStream) on arn:aws:bedrock:*::foundation-model/*.

    Action or patternActionsAccess levels
    bedrock:InvokeModel1Read 1
    bedrock:InvokeModelWithResponseStream1Read 1
  2. Allow 1 action (bedrock:ListFoundationModels) on every resource.

    Action or patternActionsAccess levels
    bedrock:ListFoundationModels1List 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

  1. 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 patternActionsAccess levels
    bedrock:InvokeModel1Read 1
    bedrock:InvokeModelWithResponseStream1Read 1
  2. Allow 1 action (bedrock:ListFoundationModels) on every resource.

    Action or patternActionsAccess levels
    bedrock:ListFoundationModels1List 1

Checks

No flags from the six checks.

Sources

  1. Amazon Bedrock User Guide: identity-based policy examples, read 16 Nov 2026
  2. AWS Service Authorization Reference, programmatic access (fetched 16 Nov 2026), read 16 Nov 2026

Last reviewed 16 Nov 2026.