Bedrock Budgeteer
A comprehensive serverless budget monitoring and control system for AWS Bedrock API usage.
Find this useful? Star the repo to follow updates and show support! ⭐ Star on GitHub
Deploy with CDK —
cdk deployfrom theapp/directory. See Deployment Guide for all options.
Bedrock Budgeteer monitors every Bedrock API call in real-time, calculates token-based costs, and enforces per-user budgets through a progressive flow: warning, grace period, suspension, and automatic restoration on budget refresh.
What’s Inside
- System Architecture — Stack composition, data flow, and key design decisions
- System Diagrams — Visual architecture and sequence diagrams
- Deployment Guide — Quick start deployment instructions
- Comprehensive Deployment — Full deployment walkthrough with all options
- Enterprise Deployment — Multi-account and enterprise setup
- CDK Bootstrap — CDK bootstrapping for your AWS account
- API Reference — Lambda functions, DynamoDB schemas, and SSM parameters
- Testing Strategy — Test structure, running tests, and coverage
- Cost Optimization — Minimizing operational costs
- IAM Policy Templates — Ready-to-use IAM policies
- KMS Setup — Customer-managed encryption key configuration
- SSM Parameters — Parameter Store hierarchy reference
- Naming Conventions — Resource naming standards
- Tagging Framework — Automated resource tagging implementation
- Tagging Strategy — Tag taxonomy and governance
Key Features
- Real-time cost tracking — Monitors every Bedrock API call and calculates token-based costs using the AWS Pricing API
- Automated budget enforcement — Per-user spending limits with progressive controls (warnings, grace period, suspension)
- Smart notifications — Multi-channel alerts via email, Slack, and SMS
- Zero-touch operation — Fully serverless with automatic user setup and budget initialization
- Enterprise-ready — Comprehensive audit trails, IAM-based access control, optional KMS encryption
Quick Start
Prerequisites
- Python 3.11+, Node.js 18+, AWS CDK CLI v2, AWS CLI v2
- AWS account with CDK bootstrapped
Deploy
cd app
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cdk deploy
Verify
python -m pytest tests/unit/ -v
About
Bedrock Budgeteer is an open-source project by TEA/Branch.
Licensed under MIT.