aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
estimate-template-cost does not support Lambda layers
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
### Name of the resource
AWS::CloudFormation::Stack
### Resource name
_No response_
### Description
I was using https://docs.aws.amazon.com/cli/latest/reference/cloudformation/estimate-template-cost.html
this CLI command to estimate the template costs. (Stack was generated via CDK)
```
aws cloudformation estimate-template-cost --template-body file://statics3withcloudfront_template.yaml
An error occurred (ValidationError) when calling the EstimateTemplateCost operation: Resource Type AWS::Lambda::LayerVersion (Logical ID: DeployWebsitedomainnameAwsCliLayerF149F4D4) does not belong to resourceCostCalculator map.
```
The above stack contains a S3 BucketDeployment which creates a Lambda under the hood.
Expected output is to get nice estimate for any valid template file specified to this command
or skip currently unsupported resources and compute estimate for other resources.
### Other Details
https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/217 (Refer this link which shows other resources that are not currently supported with estimate-template-cost)
Also support for calling this command from CDK cli would be an awesome feature
something like `aws cdk estimate-synth-cost`
which would read the output of cdk.out as template.yaml and process the cost estimate.
Contributor guide
Research direction
Start by reproducing the failure with estimate-template-cost and the statics3withcloudfront_template.yaml template, focusing on AWS::Lambda::LayerVersion. Review the related unsupported-resource discussion in issue 217. Done means valid templates no longer fail on this resource and produce an estimate or explicitly skip unsupported resources while estimating the rest.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100