sam validate - AWS Serverless Application Model

sam validate

This page provides reference information for the AWS Serverless Application Model Command Line Interface (AWS SAM CLI) sam validate command.

For an introduction to the AWS SAM CLI, see What is the AWS SAM CLI?.

The sam validate command verifies whether an AWS SAM template file is valid.

Usage

$ sam validate <options>

Options

--config-env TEXT

The environment name specifying the default parameter values in the configuration file to use. The default value is "default". For more information about configuration files, see AWS SAM CLI configuration file.

--config-file PATH

The path and file name of the configuration file containing default parameter values to use. The default value is "samconfig.toml" in the root of the project directory. For more information about configuration files, see AWS SAM CLI configuration file.

--debug

Turns on debug logging to print debug message generated by the AWS SAM CLI and display timestamps.

--lint

Run linting validation on template through cfn-lint. Create a cfnlintrc config file to specify additional parameters. For more information, see cfn-lint in the AWS CloudFormation GitHub repository.

--profile TEXT

The specific profile from your credential file that gets AWS credentials.

--region TEXT

The AWS Region to deploy to. For example, us-east-1.

--save-params

Save the parameters that you provide at the command line to the AWS SAM configuration file.

--template-file, --template, -t PATH

The AWS SAM template file. Default value is template.[yaml|yml].

If your template is in your current working directory and is named template.[yaml|yml|json], this option is not required.

If you just ran sam build, this option is not required.