Amazon Bedrock gives you access to foundation models from Anthropic, Meta, Mistral, and others, hosted in your own AWS account.
Prerequisites
- An AWS account with Bedrock access enabled
- Model access granted for the models you want (via the Bedrock console)
- AWS credentials available to the gateway host
Authentication
OpenClaw reads AWS credentials from the standard credential chain — do not put credentials in the OpenClaw config file.
Supported sources (in resolution order):
- Bearer token:
AWS_BEARER_TOKEN_BEDROCK — checked first before any key-based auth
- IAM instance profile — recommended for EC2/ECS/EKS; no config needed
- Environment variables:
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN
- Named profile:
AWS_PROFILE — selects a named profile from ~/.aws/credentials or ~/.aws/config
- Shared credentials file:
~/.aws/credentials
The IAM principal needs bedrock:InvokeModel and bedrock:InvokeModelWithResponseStream permissions.
Configuration
{
models: {
bedrockDiscovery: {
enabled: true,
region: "us-east-1",
providerFilter: [], // optional: limit to specific model providers
refreshInterval: 3600, // seconds between model list refresh
defaultContextWindow: 32000,
defaultMaxTokens: 4096,
},
},
}
| Key | Type | Default | Description |
|---|
enabled | boolean | false | Enable Bedrock model discovery |
region | string | "us-east-1" | AWS region to query |
providerFilter | list | [] | Limit to specific model providers (e.g. ["anthropic"]) |
refreshInterval | integer | 3600 | Seconds between model list refresh |
defaultContextWindow | integer | 32000 | Fallback context window size (tokens) |
defaultMaxTokens | integer | 4096 | Fallback max output tokens |
When bedrockDiscovery.region is not set, the region is resolved in this order: AWS_REGION env var → AWS_DEFAULT_REGION env var → us-east-1.
Available models
| Model | ID |
|---|
| Claude Sonnet 4.6 | us.anthropic.claude-sonnet-4-6-20251001-v1:0 |
| Claude Haiku 4.5 | us.anthropic.claude-haiku-4-5-20251001-v1:0 |
| Llama 3.3 70B | us.meta.llama3-3-70b-instruct-v1:0 |
| Mistral Large 2 | mistral.mistral-large-2407-v1:0 |
Use us.-prefixed inference profile IDs for automatic cross-region failover.
Set the default model
{
model: "us.anthropic.claude-sonnet-4-6-20251001-v1:0",
models: {
bedrockDiscovery: {
enabled: true,
region: "us-east-1",
},
},
}
Verify the connection
openclaw models status --probe-provider bedrock