Search⌘ K

Deploying a SAM Application

Understand how to deploy a serverless application with AWS SAM by creating and updating CloudFormation stacks. Learn to package your function code, deploy with the sam deploy command, and handle IAM capabilities needed for API Gateway integration.

Step 3: Deploy

You now have a single CloudFormation template (output.yaml) which describes the entire infrastructure and links to a packaged version of the function code. To create a running instance of your application, you’ll need to create a new CloudFormation stack based on this template. To do that, run the following command in the directory that contains the packaged template (output.yaml):

sam deploy --template-file output.yaml --stack-name sam-test-1 --capabilities CAPABILITY_IAM
...