You used AI to write your infrastructure. Now know exactly what it costs — before you deploy.
A zero-config CLI tool that reads your cdk synth output, calls the AWS Price List API for real prices, and produces a tiered cost estimate table across user growth scenarios.
AI-assisted IaC development generates working infrastructure fast — but a single configuration decision (NAT Gateway, multi-AZ RDS, DynamoDB billing mode change) can shift monthly costs by hundreds of dollars silently. This tool makes that visible before you deploy.
cdk synth → CDK Adapter → Classifier → AWS Price List API → Free Tier Deduction → Calculator → Output
- CDK Adapter — reads
cdk.out/manifest.json+ CloudFormation templates, normalizes resources - Classifier — categorizes each resource as Fixed (exact price from plan) or Variable (scales with users)
- Pricing Client — calls AWS Price List API for region-accurate unit prices (never hardcoded)
- Free Tier — deducts AWS Free Tier allowances for accurate low-tier estimates
- Calculator — multiplies variable costs across user growth tiers
- Output — renders tier table, generates
cost-profile.yaml, writes report JSON
- Zero config — works immediately after
cdk synthwith no setup - Real prices — all costs from AWS Price List API, never hardcoded
- Tiered output — costs shown across 0–100, 100–1k, 1k–10k, 10k–100k, 100k–1M users
- Free tier modeling — accurate $0 estimates at low usage (
--no-free-tierto disable) - Cost drift detection — diffs between runs show what changed and by how much
- Interactive wizard — guided CLI to fill in usage assumptions field by field
- CI/CD budget gate — exits code 1 if cost exceeds threshold
- MCP server — expose cost tools to AI editors (Kiro, VS Code, Continue)
- Multi-region — prices resources at their deployed region, not a default
Fixed cost (priced exactly from plan): EC2, RDS, Aurora Provisioned, ECS Fargate, ElastiCache, NAT Gateway, OpenSearch, ALB/NLB, EKS Control Plane, MSK, WAF WebACL, Transfer Family, Route 53, Kinesis (provisioned)
Variable cost (scales with users, generates cost-profile.yaml fields):
Lambda, API Gateway, DynamoDB, S3, CloudFront, Cognito, SQS, SNS, Step Functions, EventBridge, Secrets Manager, Bedrock, EKS Nodegroups, Aurora Serverless v2, WAF requests, Kinesis (on-demand), Transfer Family data
# Install
npm install --save-dev slate
# Run
npx cdk synth
npx slate estimate
# Interactive wizard to refine estimates
npx slate wizard| Command | Description |
|---|---|
slate estimate |
Full pipeline — reads cdk.out/, outputs tier table |
slate estimate --ci |
CI mode — exits 1 on budget failure, includes drift |
slate estimate --no-free-tier |
Disable free tier deductions |
slate estimate --json |
Output as JSON |
slate wizard |
Interactive profile wizard |
slate drift |
Show drift between last two reports |
slate init |
Create config file with defaults |
slate.config.json:
{
"region": "us-east-1",
"iac": "cdk",
"budget": {
"tier": "1k-10k",
"max_monthly_usd": 500,
"use": "midpoint"
}
}cost-profile.yaml is generated with fields for your detected variable resources. Fill in what you know — leave blank what you don't.
| Fields filled | Output |
|---|---|
| None | All variable costs shown as min–max range |
| Some | Filled fields exact, empty fields ranged |
| All | Every line item exact |
- Node.js 18+
- AWS CDK installed with
cdk synthworking - IAM permission:
pricing:GetProducts
TypeScript, ESM, Commander, @aws-sdk/client-pricing, @inquirer/prompts, js-yaml, chalk, tsup, vitest
MIT