'AWS other modules cant be imported as soon as psycopg2 module is installed
I have installed some python libraries ands added them to a layer of a function. I have got the error which said "errorMessage": "No module named 'psycopg2'"
So I installed the psycopg2 module and added the zip file again to the layer as new version. But now neither the psycopg module more all other modules which I import in my lambda-function.py script can be imported. [ERROR] Runtime.ImportModuleError: Unable to import module 'lambda_function': No module named 'pandas' Traceback (most recent call last):
When I use the layer version which doesnt contain the psycopg2 library the code runs well till the point which a connection to postgres DB is necessary.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|