Amazon Web Services (AWS) - Download and Install the AWS Serverless Application Model (SAM) CLI on Linux

by
Jeremy Canfield |
Updated: November 16 2023
| Amazon Web Services (AWS) articles
On a Linux system, wget can be used to download the latest version of the AWS Serverless Application Model (SAM) CLI.
wget https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip
Create a temporary directory for the AWS Serverless Application Model (SAM) CLI installation files.
mkdir /tmp/aws-sam-cli-install-files
unzip the file.
unzip aws-sam-cli-linux-x86_64.zip -d /tmp/aws-sam-cli-install-files
You can now delete the .zip file.
rm aws-sam-cli-linux-x86_64.zip
The install command can then be used to install the Serverless Application Model (SAM) CLI. By default, the AWS Serverless Application Model (SAM) CLI will be installed at /usr/local/bin/sam.
sudo /tmp/aws-sam-cli-install-files/install
You can now remove the /tmp/aws install directory.
rm -rf /tmp/aws-sam-cli-install-files
Did you find this article helpful?
If so, consider buying me a coffee over at