Bedrock is an optional provider. Install with:
pip install ai-query[bedrock]Setup
Option 1: Default Credentials (Recommended)
Use the standard AWS credential chain (env vars,~/.aws/credentials, IAM roles). If no session is provided, ai-query creates a default boto3 client.
Option 2: Custom Session (SSO, Profiles, AssumeRole)
For advanced authentication, create aboto3.Session and pass it to the provider. This gives you full control over credentials.
Using a named profile (SSO):
Usage
Available Models
See the AWS Bedrock Model IDs page for the full list of supported models.
Provider Options
Customize Bedrock-specific parameters:Available Options
Tool Calling
Bedrock supports tool calling through the Converse API:Streaming
Why Bedrock?
- Managed service: No infrastructure to manage
- Multiple providers: Access models from Anthropic, Meta, Mistral, Amazon
- VPC support: Run in your private network
- Model customization: Fine-tune models with your data
- Pay-per-use: No upfront commitments