Set up for deploying with the AWS SAM CLI and Application Composer - AWS Application Composer

Set up for deploying with the AWS SAM CLI and Application Composer

To deploy your application with AWS SAM, you first need to install and access the AWS CLI and the AWS SAM CLI. The topics in this section provide details on doing this.

Install the AWS CLI

We recommend installing and setting up the AWS CLI before installing the AWS SAM CLI. For instructions, see Install or update to the latest version of the AWS CLI in the AWS Command Line Interface User Guide.

Note

After installing the AWS CLI, you must configure AWS credentials. To learn more, see Quick setup in the AWS Command Line Interface User Guide.

Install the AWS SAM CLI

To install the AWS SAM CLI, see Installing the AWS SAM CLI in the AWS Serverless Application Model Developer Guide.

Access the AWS SAM CLI

If you use Application Composer from the AWS Management Console, you have the following options to use the AWS SAM CLI.

Activate local sync mode

With local sync mode, your project folder, including the AWS SAM template, are automatically saved to your local machine. Application Composer structures your project directory in a way that AWS SAM recognizes. You can run the AWS SAM CLI from the root directory of your project.

For more information about local sync mode, see Locally sync and save your project in the Application Composer console.

Export your template

You can export your template to your local machine. Then, run the AWS SAM CLI from the parent folder that contains the template. You can also use the --template-file option with any AWS SAM CLI command and provide the path to your template.

Use Application Composer from the AWS Toolkit for Visual Studio Code

You can use Application Composer from the Toolkit for VS Code to bring Application Composer to your local machine. Then, use Application Composer and the AWS SAM CLI from VS Code.

Next steps

To deploy your application, refer to Use Application Composer with AWS SAM to build and deploy.