The AWS SAM command line interface (CLI) is a tool for building serverless applications that are defined by AWS SAM templates. The CLI provides commands that enable you to verify that AWS SAM template files are written according to the specification, invoke Lambda functions locally, step-through debug Lambda functions, package and deploy serverless applications to the AWS Cloud.
Currently, AWS SAM CLI can be installed for using Python versions 2.7, 3.6, and 3.7. However, on January 1st, 2020, Python 2.7 will officially be End Of Life.
AWS SAM CLI is a standalone CLI tool. While we are dropping support for installing the CLI using Python 2.7, you can still use sam build to build your AWS Lambda functions on the python2.7 runtime. That is not impacted by this deprecation.
If you install AWS SAM CLI using Homebrew (for Linux or macOS) or using packaged MSIs (for Windows), you are not impacted by this deprecation notice, as those installers are based off of Python 3. Using Homebrew or MSIs depending on your platform is the recommended path forward for installing and updating the AWS SAM CLI.
Why is homebrew the recommended installation for Linux as opposed to pip?
@walkafwalka Slightly off topic on this issue but PIP is not a good way to distribute a cli. Customers who are not aware of python's ecosystem run into troubles when versions of dependencies start to conflict or try to use an unsupported python version (we only support 3.6 and 3.7 of python3 for example). PIP will not give you an isolated install either so we are moving away from PIP all together. Homebrew is just the first option we have and was an easy support because of how Linux Brew bootstraps off of the 'traditional' Homebrew for Mac.
v0.21.0 displays a warning message when running on Python 2.7
This is released