For async support with AWS Bedrock, you need to install
aioboto3:- For a Mistral model with generally good performance, look at
mistral.mistral-large-2402-v1:0. - You can play with Amazon Nova models. Use
amazon.nova-pro-v1:0for general purpose tasks. - For Claude models, see our Claude integration.
Authentication
AWS Bedrock supports three authentication methods:Method 1: Access Key and Secret Key (Recommended)
Set yourAWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION environment variables.
Get your keys from here.
Method 2: SSO Authentication
Use SSO authentication by leveraging your current AWS profile’s authentication:Method 3: Boto3 Session
Use a pre-configured boto3 Session for advanced authentication scenarios (including SSO, role assumption, etc.):The authentication methods are checked in this order: Session → API Key → Access Key/Secret Key. The first available method will be used.
Example
UseAwsBedrock with your Agent:
View more examples here.
Parameters
AwsBedrock is a subclass of the Model class and has access to the same params.