Prerequisites
- An AWS account with Amazon Bedrock enabled in your region.
- Model access granted in the Bedrock Console — some models require explicit approval.
- AWS credentials configured (see Authentication below).
Configuration
models:
bedrock-claude:
provider: amazon-bedrock
model: global.anthropic.claude-sonnet-4-5-20250929-v1:0
max_tokens: 64000
provider_opts:
region: us-east-1
agents:
root:
model: bedrock-claude
description: Assistant using Claude via Bedrock
instruction: You are a helpful assistant.
Authentication
Bedrock API key
AWS credentials
IAM role assumption
The simplest option. Generate a Bedrock API key in the AWS console and set:export AWS_BEARER_TOKEN_BEDROCK="your-key"
models:
bedrock:
provider: amazon-bedrock
model: global.anthropic.claude-sonnet-4-5-20250929-v1:0
token_key: AWS_BEARER_TOKEN_BEDROCK
provider_opts:
region: us-east-1
Uses the standard AWS SDK credential chain: environment variables → shared credentials file → config file → IAM roles.models:
bedrock:
provider: amazon-bedrock
model: global.anthropic.claude-sonnet-4-5-20250929-v1:0
provider_opts:
profile: my-aws-profile
region: us-east-1
Assume an IAM role for cross-account or scoped access:models:
bedrock:
provider: amazon-bedrock
model: anthropic.claude-3-sonnet-20240229-v1:0
provider_opts:
role_arn: "arn:aws:iam::123456789012:role/BedrockAccessRole"
external_id: "my-external-id"
region: us-east-1
Provider options
| Option | Type | Default | Description |
|---|
region | string | us-east-1 | AWS region |
profile | string | — | AWS profile name |
role_arn | string | — | IAM role ARN for assume role |
role_session_name | string | docker-agent-bedrock-session | Session name for assumed role |
external_id | string | — | External ID for role assumption |
endpoint_url | string | — | Custom endpoint (VPC or testing) |
interleaved_thinking | bool | true | Reasoning during tool calls (Claude models) |
disable_prompt_caching | bool | false | Disable automatic prompt caching |
Inference profiles
Prepend a regional prefix to model IDs for optimized routing and compliance:
| Prefix | Routes to |
|---|
global. | All commercial AWS regions (recommended) |
us. | US regions only |
eu. | EU regions only (GDPR compliance) |
models:
bedrock:
provider: amazon-bedrock
model: global.anthropic.claude-sonnet-4-5-20250929-v1:0 # cross-region routing
Use the global. prefix for automatic cross-region routing and higher availability. Use eu. for GDPR-compliant deployments.
Thinking budget
Claude models on Bedrock support extended thinking with a token budget:
models:
bedrock-claude:
provider: amazon-bedrock
model: global.anthropic.claude-opus-4-5-20251101-v1:0
max_tokens: 64000
thinking_budget: 32000
provider_opts:
region: eu-west-1
interleaved_thinking: true
Prompt caching
Prompt caching is automatically enabled for supported Claude models on Bedrock. System prompts, tool definitions, and recent messages are cached with a 5-minute TTL to reduce latency and cost.
provider_opts:
disable_prompt_caching: true # disable if needed
Example: PR reviewer
agents:
root:
model: bedrock-claude
description: PR review coordinator
instruction: |
You are a PR review coordinator. Review the code changes and
provide a structured, actionable report.
toolsets:
- type: filesystem
- type: shell
models:
bedrock-claude:
provider: amazon-bedrock
model: global.anthropic.claude-opus-4-5-20251101-v1:0
max_tokens: 64000
thinking_budget: 32000
provider_opts:
region: eu-west-1
profile: bedrock1
interleaved_thinking: true