{
  "title": "Optional (Bedrock API key/bearer token):",
  "content": "export AWS_BEARER_TOKEN_BEDROCK=\"...\"\njson5 theme={null}\n{\n  models: {\n    providers: {\n      \"amazon-bedrock\": {\n        baseUrl: \"https://bedrock-runtime.us-east-1.amazonaws.com\",\n        api: \"bedrock-converse-stream\",\n        auth: \"aws-sdk\",\n        models: [\n          {\n            id: \"anthropic.claude-opus-4-5-20251101-v1:0\",\n            name: \"Claude Opus 4.5 (Bedrock)\",\n            reasoning: true,\n            input: [\"text\", \"image\"],\n            cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },\n            contextWindow: 200000,\n            maxTokens: 8192,\n          },\n        ],\n      },\n    },\n  },\n  agents: {\n    defaults: {\n      model: { primary: \"amazon-bedrock/anthropic.claude-opus-4-5-20251101-v1:0\" },\n    },\n  },\n}\nbash theme={null}",
  "code_samples": [
    {
      "code": "2. Add a Bedrock provider and model to your config (no `apiKey` required):",
      "language": "unknown"
    },
    {
      "code": "## EC2 Instance Roles\n\nWhen running OpenClaw on an EC2 instance with an IAM role attached, the AWS SDK\nwill automatically use the instance metadata service (IMDS) for authentication.\nHowever, OpenClaw's credential detection currently only checks for environment\nvariables, not IMDS credentials.\n\n**Workaround:** Set `AWS_PROFILE=default` to signal that AWS credentials are\navailable. The actual authentication still uses the instance role via IMDS.",
      "language": "unknown"
    }
  ],
  "headings": [
    {
      "level": "h2",
      "text": "EC2 Instance Roles",
      "id": "ec2-instance-roles"
    }
  ],
  "url": "llms-txt#optional-(bedrock-api-key/bearer-token):",
  "links": []
}