v1.1.0 Ability to pass CredentialsProvider with custom duration for creating token (#5)
New provide_token() helper function as a simplified entry point for users Support for default AWS region from environment (AWS_REGION) if not explicitly provided Token expiry is now configurable via expiry: timedelta, with a default of 12 hours
Co-authored-by: Anand Khinvasara khinvasa@amazon.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
AWS Bedrock Token Generator for Python
The AWS Bedrock Token Generator for Python is a lightweight utility library that generates short-term bearer tokens for AWS Bedrock API authentication. This library simplifies the process of creating secure, time-limited tokens that can be used to authenticate with AWS Bedrock services without exposing long-term credentials.
Installation
Using pip
From source
Quick Start
Basic Usage
Create token with no parameters, uses default region, credentials and token expiry time (1 hour)
Create token using EnvProvider credentials provider
Create token with AssumeRole credentials provider
Token Format
The generated tokens follow this format:
bedrock-api-key-identifies the token type&Version=1for future compatibilitySecurity Considerations
Requirements
Development
Setting up Development Environment
Running Tests
Code Quality
Building Distribution
Contributing
We welcome contributions! Please see CONTRIBUTING.md for details on how to contribute to this project.
Development Workflow
git checkout -b feature-namepytestblack .Support
License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Related Projects
Changelog
See CHANGELOG.md for a list of changes and version history.