The AWS SAM CLI - AWS Serverless Application Model (original) (raw)

The AWS Serverless Application Model Command Line Interface (AWS SAM CLI) is the tool you use to run commands on your AWS SAM application project directory and eventually turn it into your serverless application. More specifically, the AWS SAM CLI allows you, build, transform, deploy, debug, package, initialize, and sync your AWS SAM application project directory.

The AWS SAM CLI and AWS SAM templates come with supported third-party integrations to build and run your serverless applications.

Topics

How AWS SAM CLI commands are documented

AWS SAM CLI commands are documented using the following format:

The following sam deploy command and output is an example:

$ sam deploy --guided --template template.yaml

Configuring SAM deploy
======================

    Looking for config file [samconfig.toml] :  Found
    Reading default arguments  :  Success

    Setting default arguments for 'sam deploy'
    =========================================
    Stack Name [sam-app]: ENTER
    AWS Region [us-west-2]: ENTER
    #Shows you resources changes to be deployed and require a 'Y' to initiate deploy
    Confirm changes before deploy [y/N]: ENTER
    #SAM needs permission to be able to create roles to connect to the resources in your template
    Allow SAM CLI IAM role creation [Y/n]: ENTER
    #Preserves the state of previously provisioned resources when an operation fails
    Disable rollback [y/N]: ENTER
    HelloWorldFunction may not have authorization defined, Is this okay? [y/N]: y
    Save arguments to configuration file [Y/n]: ENTER
    SAM configuration file [samconfig.toml]: ENTER
    SAM configuration environment [default]: ENTER
  1. sam deploy --guided --template template.yaml is the command you enter at the command line.
  2. sam deploy --guided --template should be provided as is.
  3. template.yaml can be replaced with your specific file name.
  4. The output starts at Configuring SAM deploy.
  5. In the output, ENTER and y indicate replaceable values that you provide.