AWS Bedrock
Bedrock gives you Claude, Llama 3, Mistral, Titan, and Cohere models behind a single AWS contract and IAM boundary.
Requirements
Section titled “Requirements”Server-side (standard AWS credential chain — IAM role, env vars, or profile):
AWS_REGION=eu-west-1AWS_ACCESS_KEY_ID=...AWS_SECRET_ACCESS_KEY=...# or use IAM Roles for Service Accounts (IRSA) in EKSOption A — SDK
Section titled “Option A — SDK”from tappass import Agent
agent = Agent("https://tappass.example.com", "tp_...")
# Claude via Bedrockresponse = agent.chat( "Hello", model="bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0",)
# Llama via Bedrockresponse = agent.chat( "Hello", model="bedrock/meta.llama3-1-70b-instruct-v1:0",)Option B — OpenAI SDK, zero-code
Section titled “Option B — OpenAI SDK, zero-code”export OPENAI_BASE_URL=https://tappass.example.com/v1export OPENAI_API_KEY=tp_...from openai import OpenAI
client = OpenAI()response = client.chat.completions.create( model="bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0", messages=[{"role": "user", "content": "Hello"}],)What’s supported
Section titled “What’s supported”- All Bedrock foundation models (Claude, Llama, Mistral, Titan, Cohere, AI21)
- Streaming + non-streaming via
InvokeModelWithResponseStream - Tool use (on models that support it — Claude, Llama 3.1+)
- Vision (Claude multimodal models)
Data residency
Section titled “Data residency”Use regional endpoints: eu-west-1 (Ireland), eu-central-1 (Frankfurt), eu-west-3 (Paris). Bedrock guarantees the model inference stays in-region.