If you are using Pycharm default template to create your AWS serverless application, you may have run into the following issue.
docker ps
/usr/local/bin/sam build HelloWorldFunction –template /Users/appc/PycharmProjects/workspacesskill/template.yaml –build-dir /Users/appc/PycharmProjects/workspacesskill/.aws-sam/build
Building codeuri: /Users/appc/PycharmProjects/workspacesskill/hello_world runtime: python3.6 metadata: {} architecture: x86_64 functions: [‘HelloWorldFunction’]
Build Failed
Error: PythonPipBuilder:Validation – Binary validation failed for python, searched for python in following locations : [‘/usr/bin/python’, ‘/usr/local/opt/python/libexec/bin/python’] which did not satisfy constraints for runtime: python3.6. Do you have python for runtime: python3.6 on your PATH?


In this case, the Build requires python3.6 version. My system is installed with 3.9.9. So all I need to do is change the template.yaml file to 3.9

-arun.