awsClaude() uses the @anthropic-ai/bedrock-sdk package, which provides the same Anthropic Messages API routed through AWS Bedrock. All Claude features (thinking, multi-modal, tool calling) work identically to the direct anthropic() provider.Setup
- Install
- Environment
Install the Anthropic Bedrock SDK:
Factory
The AWS Bedrock Claude model identifier. Use the
us. or eu. prefix for cross-region inference.Supported Models
Cross-region inference
Cross-region inference
Prefix the model ID with
us. or eu. to use cross-region inference profiles. This routes requests to the nearest available region for lower latency:Config
Authentication Methods
Method 1: Environment Variables (Recommended)
Method 2: Explicit Credentials
Method 3: Temporary Credentials (STS / SSO)
Reasoning / Extended Thinking
Claude’s extended thinking works on Bedrock just like the direct API:effort. The dated model above still uses budgetTokens. providerOptions.promptCache, clearToolResults, and compactionTokens work on Bedrock the same way.
Tool Calling
Tool calling works identically to the direct Anthropic provider:Multi-Modal Support
AWS Claude supports images and files/documents — same as the direct Anthropic provider.Images
PDF Documents
CSV Data
Full Example
The tracker preserves reported usage. A missing tariff or billing field makestotal null. Supply a catalog that matches your billing provider, API, model or deployment, tier, and region; see cost accounting.
AWS Claude vs Direct Anthropic
Use
awsClaude() when you need AWS billing, VPC isolation, or compliance certifications. Use anthropic() when you want the simplest setup with an API key.
Environment Variables
Cross-References
- Anthropic (Direct) — Direct Anthropic API with API key auth
- AWS Bedrock — Generic Bedrock provider for non-Claude models
- Reasoning — Extended thinking configuration
- Multi-Modal — Provider support matrix