A lightweight library for generating short-term bearer tokens for AWS Bedrock API authentication. Version 1.1.0, supports Python >=3.7. Released by AWS. Used to obtain tokens for invoking Bedrock without managing long-lived credentials.
pip install aws-bedrock-token-generatorVerified import paths — ran on the pinned version, not inferred.
Generate a bearer token using default AWS credentials (from environment or ~/.aws/credentials).
Use BedrockTokenGenerator class or implement your own caching with token expiry check.
Use `from aws_bedrock_token_generator import BedrockTokenGenerator` and instantiate `generator = BedrockTokenGenerator()` then call `generator.get_token()`.
Ensure AWS credentials are set via environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY) or a default profile.