AWS Bedrock provides access to high-performance foundation models through a unified API. Langtrace integration with AWS Bedrock allows you to capture and analyze interactions with various foundation models, helping you optimize and monitor your AI applications.

Available Models

Before getting started, you’ll need to request access to the specific foundation models you plan to use through the AWS Console. Visit Supported Models for a list of models available to use with the converse API.

Setup

Install Langtrace SDK

Install and initialize the SDK in your code.

Install AWS SDK

Install the AWS SDK for Python/Typescript:

Usage Example

Troubleshooting

Common Issues

  1. Model Access: If you receive a “ResourceNotFoundException”, ensure you’ve requested and been granted access to the model.
  2. Trace Capture: If traces aren’t appearing, verify you’re using the converse API and the Langtrace SDK is properly initialized.
  3. Region Availability: Some models may not be available in all AWS regions. Check the AWS Bedrock documentation for region availability.

Support

For additional help: