Skip to main content
AWS Bedrock provides access to foundation models from Amazon, Anthropic, Meta, Mistral, and more through a fully managed service.
Bedrock is an optional provider. Install with: pip install ai-query[bedrock]

Setup

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 a boto3.Session and pass it to the provider. This gives you full control over credentials. Using a named profile (SSO):
Using Assumed Role (via STS):

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