aws / aws/aws-sam-cli

Feature request: estimate-template-cost

Open
#5,674 5 comments 0 reactions 0 assignees View on GitHub
type/feature
Dominant language
Python
Stars
6.7k
Forks
1.2k
Avg merge
1d 10h
Merged PRs (30d)
52

Description

### Describe your idea/feature/enhancement

The AWS CLI offers a `estimate-template-cost` under `aws cloudformation`; however, since SAM uses Transforms, the ability to use AWS CLI on the built template is not possible. It would be great if SAM CLI supported a feature such that you could estimate the cost. Especially since the [output](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/cloudformation/estimate-template-cost.html#output) of `estimate-template-cost` is just a link to the pricing calculator. I realize that it might be counter intuitive since it is "serverless"; however, it would help in budget projections and proposals as well as for those more "fixed" style costs such as WAF ACL

### Proposal

I'd propose this be a new options such as: `sam estimate-cost` which would then, given the template.yaml generated by `sam build`, output a link to the pricing calculator with the appropriate resourced configured. The user of the tool can then, via the calculator, input their own values to further "dial-in" their cost estimates.

Things to consider:
1. Does the pricing calculator support all of the resources that SAM build would generate?
2. Will the pricing calculator allow a URL to be generated that allows for dynamic values? (i.e. expand the scope of the build.toml to accept specific throughput)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.