Route Claude Code through Amazon Bedrock via Portkey. Get full observability, cost tracking, budget controls, and cross-region inference support. See Claude Code overview for why platform teams use Portkey.Documentation Index
Fetch the complete documentation index at: https://portkey-docs-feat-support-overview-page.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Important: Always use the latest version of Claude Code. Older versions may not work with Portkey’s gateway.
Quick Start
Create a Virtual Key
Go to Virtual Keys → Create → Select Amazon Bedrock.Enter your AWS credentials:
- AWS Access Key ID
- AWS Secret Access Key
- AWS Region (e.g.,
us-east-1)

Get Your Portkey API Key
Go to API Keys → Generate a new key.
Configure Claude Code
Edit Replace:
~/.claude/settings.json (user-level) or .claude/settings.json (project-level):YOUR_PORTKEY_API_KEYwith your Portkey API keyYOUR_VIRTUAL_KEYwith your virtual key ID
Cross-region inference: The
us. prefix enables cross-region inference, routing requests to the nearest available region. Remove the prefix to use a specific region.The
CLAUDE_CODE_SKIP_BEDROCK_AUTH and CLAUDE_CODE_USE_BEDROCK must be set as numbers (not strings).Using a Config
For advanced features like fallbacks, caching, or retries, create a Portkey Config:Create a Config
Adding Metadata
Track Claude Code usage by team, project, or user:Advanced Configuration
Fallbacks
Route to backup providers when Bedrock fails. Create a config with fallback targets:Load Balancing
Distribute requests across multiple providers or regions:Caching
Reduce costs and latency for repeated queries:Retries
Automatically retry failed requests:Budget Limits
Set spending controls on your virtual key:- Go to Virtual Keys → Select your Bedrock virtual key
- Click Edit → Budget & Limits
- Configure:
- Cost limit: Maximum spend (e.g., $500/month)
- Rate limit: Requests per minute/hour
Troubleshooting
Claude Code Version Issues
Cause: Older versions of Claude Code may not be compatible. Fix: Update to the latest version:Complete Example
Full configuration with all features enabled:Next Steps
Access Controls
Set up fine-grained permissions and audit logging
Budget Management
Prevent overspending with hard budget limits

