Install AWS SAM CLI on Linux without Homebew

The official AWS installation docs for Linux tell you to install Homebew so that you can install the AWS SAM CLI. This is just plain dumb. You should not need to install a new package manager just to install one tool. Below are the steps to follow so that you do not have to.

Prerequisites

Installation

pip3 install --user aws-sam-cli

All done! Yep, it is really that simple. If you already had all the prereqs installed like I did it should only take 20 seconds.

If your terminal cannot find the sam command also run this

echo ‘export PATH=~/.local/bin:$PATH’ >> ~/.bashrc

Updates

When it comes time to update SAM, run the following:

pip3 install --user --upgrade aws-sam-cli

This could be turned into a cron job for auto updates or if someone knows a better way for auto updating python3 packages please leave a comment.

Sources

User siwyd in this GitHub issue: https://github.com/awslabs/aws-sam-cli/issues/1424

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.