- 新しい順
- 投票が多い順
- コメントが多い順
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
関連するコンテンツ
- AWS公式更新しました 3年前
Thank you!
Worked as a charm after also adding a
pip install cfn-lint
in my Github action