SAM Doctor

ERROR REFERENCE

SAM lint validation found one or more cfn-lint matches

sam validate --lint finished with at least one cfn-lint match. The summary confirms that validation failed, but the rule code and template location in the preceding output are the useful evidence.

WHAT IT MEANS

The summary is not the root cause

[[E1031: ToJsonString validation of parameters] (...) matched 17]
Error: Linting failed. At least one linting rule was matched to the provided template.

SAM Doctor treats this as a medium-confidence handoff: the exact summary says a lint rule matched, but it does not say which rule or which part of the template needs attention. The nearby E#### or W#### output carries that detail.

NEXT CHECK

Read the matched rules

  1. Validate the exact submitted template again:
    sam validate --lint --template-file template.yaml
  2. Read every rule code above the summary. Keep the reported resource, property path, and line number with each code; do not infer a template problem from the summary alone.
  3. Look up the rule rather than guessing:
    cfn-lint --list-rules
    The SAM lint validation guide explains how SAM runs cfn-lint and reports its results.
  4. Re-run validation after reviewing the reported locations. Confirm that no lint matches remain before deploying.

AUTOMATE THE TRIAGE

Preserve the lint handoff automatically

SAM Doctor recognizes this exact summary with medium confidence and points back to the nearby cfn-lint output. It does not turn a bare rule code or an unrelated validation failure into this finding. Runs locally; no AWS access, no log upload.

python -m pip install sam-doctor
sam-doctor diagnose deployment.log --format markdown

RELATED