bedrock-cost-calculator
07 May, 2026 · Python
A small CLI that estimates AWS Bedrock costs for an inference workload and ranks the optimization levers that pay back the most.
https://github.com/knbrlo/bedrock-cost-calculator →A small CLI that estimates AWS Bedrock costs for an inference workload and ranks the optimization levers that pay back the most. It's the working tool behind the post Seven AWS levers that cut $1.5M from a production SaaS bill. The post covers the levers conceptually. The CLI runs the math.
What it does
Given a model, a token-in / token-out shape, and your traffic volume, it returns:
- Monthly and annual cost estimate
- Cost breakdown across input, output, and prompt cache
- Top levers ranked by potential savings (prompt caching, model selection, output discipline, provisioned throughput, batch mode)
Run
python bedrock_cost.py \
--model claude-sonnet-4 \
--tokens-in 4000 \
--tokens-out 600 \
--requests-per-day 50000 \
--cache-hit-rate 0.0
Status
v0.1 — single-file Python CLI, static pricing table, five levers. Next: read CloudWatch Bedrock invocation logs directly so you don't have to guess your token shape. Then per-tenant cost split.