Skip to content

Bedrock API key (bearer token)

A bedrock-key profile stores an AWS Bedrock bearer token (AWS_BEARER_TOKEN_BEDROCK). These tokens authenticate directly without SigV4 signing.

  • You have a Bedrock API key (bearer token)
  • You don’t want to set up the full AWS CLI credential chain
Terminal window
ccswitch add
# choose "Bedrock API key", paste the token, optionally set region

Or snapshot from the environment:

Terminal window
export AWS_BEARER_TOKEN_BEDROCK=bedrock-api-key-...
ccswitch save bedrock-prod --type bedrock-key

Short-term tokens (bedrock-api-key-…) embed an expiry that ccswitch parses automatically. Long-term tokens (ABSK…) are untracked.

  • Expired: switching is blocked → ccswitch refresh <name>
  • Expiring (< 30min): warning printed, switch proceeds
Terminal window
export AWS_BEARER_TOKEN_BEDROCK=<new-token>
ccswitch refresh bedrock-prod

On global switch, the token is written to settings.json in plaintext (Claude Code has no helper mechanism for it). Per-shell (ccuse) avoids this by exporting only into the shell.

This site uses GoatCounterfor page counts — no cookies, no personal data, no tracking across sites.