My set of tricks to make it work on Apple M1 (MacOS 11.6 Big Sur)
brew remove aws-sam-cli # will be installed below using pip brew install pyenv # Also you may need to remove an existing python version # brew remove email@example.com pyenv install 3.7.13 # < 3.7 is currently required by AWS SAM pyenv global 3.7.13 vim ~/.zshrc || vim ~/.bashrc ### add these lines to the *rc file: # >> PYENV export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init --path)" # << PYENV #save and close the file #open a new terminal window pip install aws-sam-cli wheel # you may also need this if you have Podman, even if you build locally: # pip install paramiko
python -V && pip -V && sam --version # Python 3.7.13 # pip 22.0.4 from /Users/yevhen.hlotov/.pyenv/versions/3.7.13/lib/python3.7/site-packages/pip (python 3.7) # SAM CLI, version 1.53.0
Build the project with
sam build and it should work now.
I feel we should create a separate ticket since the issue (summarized by @cyrus-mc) is affecting more and more people.
@frimik , could you please share more details about the issues you have met?