Article: Claude Code can now be run through AWS Bedrock at a fraction of the price developers usually pay to Anthropic. A developer built a self-hosted LiteLLM proxy that makes the Claude Code CLI think it is talking to Anthropic while the requests actually route to Amazon’s Nova model on Bedrock, cutting learning-phase spend by 20 %–35 %.

Why the proxy matters

Learning to write “agentic” code with Claude Code burns Anthropic API credits fast—every mis-prompt or long debugging session adds up. For developers experimenting with agent loops, tool calling and context management, that cost can stall progress. The proxy lets you keep the same workflow but pay with AWS credits, which are typically cheaper per token.

The problem with existing options

  • Local models (e.g., Ollama). Running a comparable model on a laptop or workstation demands high-end RAM and a GPU, which many developers don’t have.
  • Free-tier APIs (e.g., OpenRouter). Token caps fill up quickly when testing multi-step agents, forcing a switch back to paid plans. Both approaches either require costly hardware or run out of quota before a full agent cycle can be exercised.

How the LiteLLM proxy works

  1. Dockerised LiteLLM instance runs on a developer’s machine or a cheap cloud VM.
  2. The Claude Code CLI points at the proxy’s local endpoint, believing it is contacting Anthropic.
  3. The proxy rewrites the request to match Amazon Nova’s API format and forwards it to Bedrock.
  4. Nova’s responses are translated back into the shape the CLI expects. Because the CLI never knows the difference, the developer can keep using the same prompts, tool-calling syntax and context-management patterns that Claude Code supports.

Safety mechanisms baked in

  • No artificial session limits. The proxy imposes no extra caps beyond Bedrock’s.
  • IAM restrictions. Access keys lock to a single model, preventing accidental switches to higher-priced options.
  • AWS budget alerts. A budget rule watches the account and notifies the user if spend spikes unexpectedly. These controls keep the experiment low-risk and transparent.

Cost comparison

Based on publicly listed Bedrock pricing, the proxy delivers 20 %–35 % lower spend than using Claude Haiku directly through Anthropic. The exact figure depends on the token mix of the agent’s prompts and responses, but the reduction is consistent enough to make a noticeable dent in a learning budget.

The Docker image and configuration files live on GitHub under the creator’s name, Priyanshu Valiya. A quick search pulls down the artifacts anyone can use to replicate the setup.

What the proxy does not do

  • It is not a free-run for Claude. The model behind the scenes is Amazon Nova, not Claude. Nova supports similar reasoning and tool-calling primitives, but its output style and performance differ.
  • It is not a production benchmark. Using the proxy to judge Claude Code’s suitability for a live service would mislead, because the underlying model and pricing differ.
  • Token-only cost tracking is insufficient for production. AWS is moving from “Bedrock Agents Classic” to “AgentCore.” In the newer offering, charges accrue not only for tokens but also for platform services such as agent invocation and gateway requests. Developers shifting from learning to production need to watch those extra line items.

What to watch next

  • AWS AgentCore pricing updates. As the platform matures, new fees may appear for features like agent orchestration or request routing. Checking the AWS pricing page will prevent surprise invoices.

Takeaway

By interposing a LiteLLM proxy between Claude Code and AWS Bedrock, developers can practice agentic coding at 20 %–35 % lower cost than using Anthropic’s API directly. The trade-off is a different underlying model and the need for vigilant budgeting, but the core learning experience stays intact. For anyone stuck on a credit ceiling while exploring tool-calling agents, the proxy offers a practical, low-risk shortcut.