I am working in PyCharm with the AWS SAM and AWS SAM CLI modules. I am trying to setup a simple program:
- An Amazon Lambda layer for "ROCFacade"
- ROCFacade will import Python's standard requests module. After installing it with PIP, I copied it from the External Libraries/python3.8/site-packages folder (third box) to the lambda-layers subfolder in the second box.
- I am trying to call it from hello-world/app.py which so far is little more than the boilerplate installed by AWS SAM
When I try to run it, PyCharm reports that the ROCFacade module cannot be found.
The error message occurs if I ran it with an "app" configuration or with the Lambda configuration, below.
I have another project that uses the same ROCFacade with a simple main.py console app so the code does work. I'm not sure if my problem here is with environment variables (i.e., Python doesn't know to look in the lambda-layers folder) or the Pythong app/Lambda configuration. I am a newbie to both Python and Lambda/AWS development.
Thank you