Summary
We should validate the example IaC:
- validate the template (lint), ex:
sam validate --lint
- validate that it "works", ex:
sam build (we already have the compilation with maven/gradle)
Not only for SAM but for others too.
Why is this needed?
Make sure the provided templates (IaC) are working.
Which area does this relate to?
Governance, Tests
Solution
Use sam validate --lint (see https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/validate-cfn-lint.html and https://github.com/aws-cloudformation/cfn-lint#config-file) + sam build for SAM.
See also https://awslabs.github.io/serverless-rules/cfn-lint/
For terraform, use terraform validate and tflint.
Acknowledgment
Summary
We should validate the example IaC:
sam validate --lintsam build(we already have the compilation with maven/gradle)Not only for SAM but for others too.
Why is this needed?
Make sure the provided templates (IaC) are working.
Which area does this relate to?
Governance, Tests
Solution
Use
sam validate --lint(see https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/validate-cfn-lint.html and https://github.com/aws-cloudformation/cfn-lint#config-file) +sam buildfor SAM.See also https://awslabs.github.io/serverless-rules/cfn-lint/
For terraform, use
terraform validateandtflint.Acknowledgment