sam validate - Amazon Serverless Application Model
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

sam validate

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

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

The sam validate command verifies whether an Amazon 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 Amazon 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 Amazon SAM CLI configuration file.

--debug

Turns on debug logging to print debug message generated by the Amazon 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 Amazon CloudFormation GitHub repository.

--profile TEXT

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

--region TEXT

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

--save-params

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

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

The Amazon 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.