Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 777 Bytes

serverless-sam-cli-using-validate.md

File metadata and controls

13 lines (9 loc) · 777 Bytes

Validating AWS SAM Template Files

Validate your templates with [sam validate](sam-cli-command-reference-sam-validate.md). Currently, this command validates that the template provided is valid JSON / YAML. As with most AWS SAM CLI commands, it looks for a template.[yaml|yml] file in your current working directory by default. You can specify a different template file/location with the -t or --template option.

Example:

sam validate
<path-to-file>/template.yml is a valid SAM Template

Note
The sam validate command requires AWS credentials to be configured. For more information, see Configuration and Credential Files.