Skip to main content

Least-Privilege IAM for Bedrock — Access, Regions, and IAM

← Back to Dashboard
1. Model Access and Region Strategy2. Least-Privilege IAM for Bedrock

Least-Privilege IAM for Bedrock

📚 Access, Regions, and IAM⏱ 11 min⭐ 65 XP⌨ Hands-on lab

Identity Boundaries First

Use dedicated IAM roles for Bedrock callers and grant only the actions and model resources required. A leaked credential with bedrock:* on * can silently run up enormous token bills or exfiltrate data through model calls - least privilege is your first cost control and your first security control.

A Production-Shaped Policy

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "InvokeApprovedModelsOnly",
      "Effect": "Allow",
      "Action": [
        "bedrock:InvokeModel",
        "bedrock:InvokeModelWithResponseStream"
      ],
      "Resource": [
        "arn:aws:bedrock:us-east-1::foundation-model/amazon.nova-lite-v1:0",
        "arn:aws:bedrock:us-east-1::foundation-model/amazon.nova-pro-v1:0",
        "arn:aws:bedrock:us-east-1:123456789012:inference-profile/us.anthropic.claude-sonnet-5-5",
        "arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-sonnet-5-5",
        "arn:aws:bedrock:us-west-2::foundation-model/anthropic.claude-sonnet-5-5",
        "arn:aws:bedrock:us-east-2::foundation-model/anthropic.claude-sonnet-5-5"
      ]
    }
  ]
}

Note what this policy does not include: no bedrock:CreateGuardrail, no customization jobs, no ListFoundationModels. Also note the cross-region nuance: invoking us.anthropic.claude-sonnet-5-5 requires permission on both the inference-profile ARN in your caller region and the underlying foundation-model ARNs in every destination region the profile can route to.

Common IAM Mistakes with Bedrock

MistakeRiskFix
"Resource": "*" on invoke actionsAny newly enabled model becomes instantly callablePin foundation-model ARNs per environment
One shared role for app + adminApp compromise grants policy/config mutationSeparate runtime and management roles
Long-lived access keys in codeKey leakage = unlimited token spendUse role assumption (IRSA, instance profiles, Lambda execution roles)
No CloudTrail review for bedrock eventsSilent misuse goes unnoticedAlert on anomalous InvokeModel volume and denied calls

Defense in Depth

Combine IAM with application-side allowlists so business logic cannot invoke unapproved models even if policy broadens later. IAM answers "what is this principal allowed to call?"; your config answers "what has this product approved?". Both should agree, and either alone should be enough to block a mistake.

Pro tip: for organisation-wide enforcement, add a Service Control Policy (SCP) that denies bedrock:InvokeModel on any model ARN outside your approved catalogue. Individual account admins then cannot accidentally widen access.
⌨ HANDS-ON LABValidate Scoped IAM Policy for Bedrock InvokeModel
⭐ +150 XP

Verify that application IAM policies restrict model invocation strictly to permitted foundation models and guardrails.

1Simulate IAM policy evaluation for Bedrock InvokeModel action.
lab-sandbox — simulated environment
INFINITY LAB SANDBOX v2.6 — simulated shell
Type the command for the current objective. Helpers: "hint", "solution", "clear".
$
OBJECTIVE 1 / 1 — type "hint" if stuck
🧪 Knowledge Check
Press 1-4 to select1 of 4
What is the best IAM baseline for Bedrock workloads?
AdministratorAccess everywhere
Least privilege scoped to needed Bedrock actions and resources
No IAM, app only
Root user keys