AWS Bedrock with LangSpend

← Back to Home

Track AWS Bedrock model costs with zero-code attribution

AWS Bedrock Integration

Learn how to track AWS Bedrock model costs with LangSpend. Works with Claude, Llama, and other Bedrock models.

Installation

Install required packages

terminal

Basic Setup

Wrap your Bedrock client

index.ts

Claude on Bedrock

Claude 4 Sonnet Example with Customer & Feature Tracking

💡 Custom Metadata: Use the meta property in customer and feature objects to pass any custom properties for advanced tracking and analytics.

bedrock-claude.ts