Skip to content

[Feature]: Support Amazon Bedrock API Key (Bearer Token) Authentication #2251

Description

@pahud

Summary

Currently, Clawdbot only supports Amazon Bedrock via the AWS SDK default credential chain (environment variables, shared config, instance roles). Users who have Bedrock API keys (bearer tokens
) generated from the Amazon Bedrock console cannot use them directly with Clawdbot.

This limits flexibility for users who:

  • Prefer API key-based authentication over IAM credentials
  • Work in environments where AWS SDK credential chain setup is complex
  • Want a simpler onboarding experience similar to other AI providers

Proposed solution

Add support for AWS_BEARER_TOKEN_BEDROCK environment variable as an authentication option for Amazon Bedrock, similar to how opencode implements it.

The authentication precedence should be:

  1. Bearer Token - AWS_BEARER_TOKEN_BEDROCK environment variable (new)
  2. AWS Credential Chain - Existing behavior (access keys, profiles, instance roles)

This would allow users to simply set:

AWS_BEARER_TOKEN_BEDROCK=xxx clawdbot gateway

Alternatives considered

  • OpenAI-compatible proxy: The current docs suggest placing an OpenAI-compatible proxy in front of Bedrock, but this adds complexity and another service to maintain.
  • Stick with AWS SDK chain: Works but requires more setup (IAM users, roles, credentials files) compared to a simple API key.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions