(cli): Stack cost estimator
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Description
Add the ability to analyze a synthesized CloudFormation template in the [AWS Pricing Calculator](https://calculator.aws/#/)
### Use Case
There are many tradeoffs to make when developing an application. Having the ability to analyze the potential cost of a solution prior to deployment can help with determining cost related tradeoffs. This can especially be helpful when using community constructs or higher level constructs that may deploy resources that the user isn't aware of.
### Proposed Solution
1. User runs `cdk synth --cost`
2. The cdk synthesizes the template and calls the the CloudFormation [EstimateTemplateCost Api](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_EstimateTemplateCost.html)
3. The CLI outputs the Pricing Calculator URL returned by the API
### Other information
_No response_
### Acknowledge
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
Contributor guide
Research direction
Start at the CLI entry point for `cdk synth` and trace how synthesized CloudFormation templates are produced. Review the CloudFormation EstimateTemplateCost API and determine how `--cost` should pass the template and display the returned Pricing Calculator URL. Done means the command synthesizes the template, calls the API, and prints the URL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cli, cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100