teinam/my_harness_for_claude_code/aws-bedrock
Claude Code and agent skill by teinam/my_harness_for_claude_code
- community
Checking that the SKILL.md file is still in the repository.
Amazon Bedrock — Converse API, model invocation (Claude / Llama / Nova / Mistral / Titan), Agents, Knowledge Bases, Guardrails, prompt caching, cross-region inference profiles, cost tracking. Trigger: bedrock-runtime, Converse, InvokeModel, BedrockAgent, retrieve_and_generate, guardrail, inference profile, model arn, embedding (Titan / Cohere), provisioned throughput.
Install
npx vskill@latest install teinam/my_harness_for_claude_code/aws-bedrockSKILL.md
The same SKILL.md was published earlier as teinam/my_harness_for_claude_code/aws-bedrock.
AWS Bedrock
Bedrock is the unified front door to multiple foundation models on AWS, with IAM-based access, regional residency, VPC endpoints, and built-in CloudWatch / CloudTrail. Reach for it when "we need the same model, but inside our AWS boundary, billed on our AWS account" matters more than calling provider SDKs directly.
When to Activate
- Calling Claude / Nova / Llama / Mistral / Cohere through
bedrock-runtime - Building Bedrock Agents or Knowledge Bases (RAG with managed retrieval)
- Adding Bedrock Guardrails (PII, profanity, contextual filters)
- Embeddings via Titan / Cohere
- Comparing Bedrock vs direct provider SDKs (Anthropic, OpenAI)
- Provisioned throughput planning
Bedrock vs Direct Provider SDKs
| Need | Pick | |
|---|---|---|
| Stay inside one AWS account / billing / IAM | Bedrock | |
| Latest Anthropic / OpenAI features same-day | Direct SDK | |
| Data residency (EU/AP), VPC endpoints | Bedrock | |
| PrivateLink, no public internet | Bedrock | |
| Lowest absolute cost on a single model | Often direct SDK | |
| Multi-model ensemble in one IAM boundary | Bedrock |
Bedrock typically lags the provider's own API by weeks for new features. Confirm Converse supports a feature before designing around it.
Converse API: The Default
Converse (and ConverseStream) is the unified, model-agnostic API. Prefer it over InvokeModel — it normalises message structure, tool use, and streaming across models.
Use ConverseStream for token-by-token streaming. The event shape is the same across providers — switching models is a modelId change, nothing else.
Model IDs and Inference Profiles
Bedrock model IDs come in two flavours:
- Foundation model ARN/ID —
anthropic.claude-sonnet-5-5
(region-bound; only callable in regions where the model is hosted).
- Cross-region inference profile —
us.anthropic.claude-sonnet-5-5
(us.*, eu.*, apac.*, global.*). Routes across AZs/regions for higher availability and throughput. Default to inference profiles in production unless data residency forbids it. Regional/multi-region endpoints carry a 10% premium over global.*.
Current Claude IDs: anthropic.claude-opus-5-5, anthropic.claude-fable-5-2, anthropic.claude-sonnet-5-5, anthropic.claude-haiku-5-5 — e.g. global.anthropic.claude-opus-5-5, global.anthropic.claude-fable-5-2, global.anthropic.claude-sonnet-5-5, global.anthropic.claude-haiku-5-5 (all four verified callable through Claude Code 2026-11; Fable 5.2 is offered as global.* / us.* on the bedrock-runtime endpoint only). Opus 5.5 / Fable 5.2 reject forced toolChoice (any/tool) and disabled thinking — see claude-api for the full breaking-change table.
Claude Code on Bedrock: the sonnet alias resolves to Sonnet 4.5, not Sonnet 5.5, and haiku has no pinned target, unless you set ANTHROPIC_DEFAULT_SONNET_MODEL / ANTHROPIC_DEFAULT_HAIKU_MODEL (e.g. to the global.* IDs above; the bare claude-sonnet-5-5 also works — measured 2026-10-06). opus → Opus 5.5 and fable → Fable 5.2 already (measured 2026-11-15). Fast mode is not available on Bedrock.
Each region has different model availability — check ListFoundationModels before assuming. The console page lies less than the docs.
Tool Use (Function Calling)
Tool schemas are JSON Schema. Keep them tight — the model uses the description as much as the schema; ambiguous descriptions cause hallucinated args.
Prompt Caching
For Claude on Bedrock, cache stable prefixes (system prompt, large docs):
Cache hits are 10% of input cost (5% on Opus 5.5, 2.5% on Fable 5.2); misses cost a 25% premium. Worth it for any prompt > ~2k tokens that gets reused.
Knowledge Bases (Managed RAG)
Bedrock Knowledge Bases handle ingestion → chunking → embedding → vector storage → retrieval → grounded generation in one managed flow.
When to use it: fast prototype, OpenSearch Serverless / Aurora pgvector backed, no infra to babysit. When NOT: when you need custom chunking strategies or hybrid retrieval — roll your own with Retrieve + Converse.
Guardrails
Pre/post filters for PII, profanity, denied topics, contextual grounding, prompt injection detection.
Guardrails are model-agnostic — same guardrail works across Claude / Llama / Nova. The contextual grounding filter (RAG hallucination check) is the most useful one in practice.
Embeddings
- Titan Text Embeddings v2 — 1024/512/256 dim, multilingual, cheap default.
- Cohere Embed v3 — better retrieval quality on English, supports
input_type (search_query vs search_document).
Use InvokeModel for embeddings — Converse is text-generation only.
Pricing Discipline
- On-demand for spiky / experimental workloads.
- Provisioned Throughput only when you've measured a steady RPS that
justifies the hourly commit (math: monthly commit / on-demand cost at that RPS). Most teams overprovision. Buying it is a commitment billed by the hour: show the RPS evidence, model units, term, and monthly cost, and let the user buy it. Do not call CreateProvisionedModelThroughput yourself.
- Batch inference for non-interactive jobs — 50% cheaper than on-demand,
hours-scale latency.
- Tag
bedrock-runtimeinvocations via theapplicationIdfield in
requestMetadata (CloudTrail) to attribute spend per feature.
- CloudWatch metrics:
Invocations,InputTokenCount,OutputTokenCount,
InvocationThrottles. Alarm on throttles before they bite.
Networking
- VPC interface endpoint (
com.amazonaws.<region>.bedrock-runtime) for
workloads in private subnets. Avoids NAT egress, keeps traffic inside AWS.
- PrivateLink with same endpoint name — no public DNS resolution required.
- KMS-encrypted requests via custom CMK if compliance requires customer-managed
keys for prompts/responses at rest in CloudWatch.
Bedrock Agents
Use Agents when you want managed orchestration: action groups (Lambda-backed tools), session memory, and trace UI. Skip them when:
- You need fine-grained control over the loop (custom retry, custom routing)
- You're already using a framework (LangGraph, custom harness)
- You want portable code (Agents are AWS-locked)
Common Pitfalls
- Region mismatch — model not available, throws
AccessDeniedException
with a misleading message. Always check ListFoundationModels for the region.
- Old model IDs — IDs change with model versions. Pin via inference profile
ARN, not bare model ID, to absorb minor version bumps.
- Streaming + tool use — partial JSON in tool args; buffer the full
toolUse block before parsing.
- Throttling — default quotas are low. Request limit increases for any
production workload before launch.
- PII in CloudWatch logs — Bedrock can log requests/responses. Disable
model invocation logging in compliance environments, or route through KMS-encrypted destination only.
Related
[skills/aws-cloud]— IAM, VPC endpoints, CloudWatch[skills/claude-api]— when to call Anthropic directly instead[skills/cost-aware-llm-pipeline]— caching, batching, model routing
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/aws-bedrock/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/teinam/my_harness_for_claude_code/aws-bedrock)