Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

AWS SAM Deployment Demo


AWS SAM Deployment

Earlier, we have introduced you to AWS SAM Templates.

To refresh your memory, you can read about them here: AWS Serverless Developer Journey.

AWS SAM has a CLI that helps you deploy SAM Templates.

A CLI stands for Command Line Interface.


AWS SAM Deployment Demo Video

W3schools.com collaborates with Amazon Web Services to deliver digital training content to our students.


AWS SAM Packaging

You need to package a SAM template in a .zip file.

To package a SAM template, you can use a sam package command.

You also need to provide the S3 bucket.

Your .zip file will be stored in that S3 bucket.

To specify the S3 bucket, you can use this variation of a package command: sam package —s3-bucket my-bucket-name

The .zip file containing your template will be deployed from the S3 bucket.


AWS SAM CLI Deployment

A single command can install your serverless app.

A single command to deploy your application is sam deploy.

The SAM CLI generates and manages S3 buckets for you with sam deploy.


AWS SAM Deployment Interactive Mode

The sam deploy has an interactive mode.

The interactive mode is called with sam deploy —guided command.

This mode:

  • Guides you through the deployment settings
  • Gives you default selections
  • Remembers your input

The command output can show application changes that will be deployed.

The command can be configured to ask for confirmation before deployment.

The images below show an example of the sam deploy --guided command process.

Sam deploy guided overview Sam deploy guided overview

Image created by Amazon Web Services


AWS Serverless Exercises

Test Yourself With Exercises

Exercise:

What is the CLI command for SAM Deployment Interactive Mode?

sam deploy —

Start the Exercise


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
sales@w3schools.com

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
help@w3schools.com

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.