Cloud Cost Model
A spreadsheet or script that maps your architecture to a monthly dollar figure before you build it.
Why
Cloud bills are post-hoc and opaque — you find out you spent $14k on egress when the invoice arrives, by which point the architecture is already baked. A cost model built during the design phase lets you compare 'this design costs $3k/mo, that one costs $9k/mo' before committing, and it surfaces the expensive components (egress, managed DB IOPS) while you can still choose differently. Teams without a cost model routinely pick architectures that are technically elegant and financially unsustainable.
When
During system design, before committing to a managed service or multi-region layout. Takes 2-4 hours. Re-run when architecture changes.
How
1. List every resource the architecture will use (compute, storage, network, managed services) 2. For each, look up the pricing unit (per-hour, per-GB, per-request, per-IOPS) 3. Estimate the volume per unit (hours/month, GB stored, requests/month) 4. Multiply and sum; add 20% buffer for growth + unaccounted overhead 5. Flag the top 3 cost drivers — these are where optimization effort pays off 6. Compare at least 2 architectural alternatives in the same model 7. Re-run the model monthly with actual usage to calibrate future estimates
Example
Architecture: API on 4x t3.medium + RDS + S3 + CloudFront Cost model (monthly): Compute: 4 × $30/mo (t3.medium) = $120 RDS: $93/mo (db.t3.small) + $20 storage = $113 S3: 500GB × $0.023 = $11.50 Egress: 2TB out × $0.09 = $180 ← top driver CloudFront: 2TB × $0.085 = $170 Total ≈ $594/mo (+20% buffer = $713) Alternative (API on Lambda + DynamoDB): ≈ $310/mo → Lambda wins on cost; trade-off: cold starts (see ADR)
Common Problems
- ⚠Forgetting egress — it's often 30% of the bill and invisible in per-resource pricing pages; always model data transfer explicitly.
- ⚠Using list price without applying committed-use or free-tier discounts — the model over-predicts and kills good architectures on false cost.
Best Practices
- ✓Model the p50 and p90 cost, not just a point estimate — usage variance means the worst-case month matters for budgeting.
- ✓Tag every resource with cost-allocation tags on day 1 so the model can be validated against real bills per component.