How Can I Accurately Estimate AWS Costs Before Deploying My CDK Stacks?
Asked by
TechNerd33
As a former infrastructure engineer exploring CDK tooling, I'm curious about different strategies for estimating AWS costs prior to deployment. Do people typically eyeball costs, utilize spreadsheets, or run tests in a development account first? Are there any specific tools or methodologies that I might not be aware of? I'm particularly interested in avoiding those cost shocks after deploying what seemed reasonable in my CDK code.
Answers
Check out the AWS Pricing Calculator. It's not perfect, but it can give you a solid estimate if you know your scale. Many services also list pricing examples which can help.
Reply to this answer
Cost considerations are central to architectural decisions. Every AWS service has detailed pricing info, so creating at least a rough estimate for each service is essential.
Reply to this answer
Have you checked Infracost? It simplifies the cost estimation process, making it easier to see what your stack might cost.
Reply to this answer
Honestly, cost prediction is part of my routine. If I see resources priced hourly, I just multiply by 730 for a monthly max estimate. Egress costs are trickier, though, so I usually prepare for worst-case scenarios of around 9 cents per GB.
Reply to this answer
I've been using Q Developer recently, which accesses my billing account in read-only mode. It's great for incorporating enterprise discounts into my estimates. While I primarily use Terraform, CDK should give similar results if you focus on the generated CloudFormation. Just provide the AI with information like expected traffic and let it do the heavy lifting for cost estimation.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions