- Newest
- Most votes
- Most comments
sam validate
does not provide an out-of-the-box feature to ignore specific warnings or errors based on their ID directly in the command or through a configuration file. The primary purpose of sam validate is to check the syntax and basic structure of the SAM template, not to provide extensive linting capabilities. For this reason, if sam validate returns a non-zero exit code due to a warning you wish to ignore, you might need to consider alternative approaches.
cfn-lint
is a more flexible tool when it comes to linting CloudFormation templates, including SAM templates in YAML or JSON format. It allows for extensive customization of the linting process, including ignoring specific rules. To ignore specific checks with cfn-lint, you can use the --ignore-checks
option followed by the IDs of the checks you want to ignore. For example:
cfn-lint template.yaml --ignore-checks W3002 W3045
Relevant content
- asked 4 months ago
- Accepted Answerasked 10 months ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago
Thank you!
Worked as a charm after also adding a
pip install cfn-lint
in my Github action