Generate short-lived AWS Bedrock API keys that can be used as bearer tokens for authentication.
This tool creates presigned AWS Bedrock API tokens that are valid for 12 hours and can be used in place of direct AWS credential-based authentication.
Inspired by aws-bedrock-token-generator-python. See Bedrock documentation for more details.
Ensure your AWS credentials are configured (via environment variables, AWS credentials file, or IAM role). Then run:
bedrock-api-key
The token command outputs on stdout can be used as AWS_BEARER_TOKEN_BEDROCK environment variable value for Claude Code running on Amazon Bedrock.