Im creating a lambda function to connect to an RDS Postgresql instance, using psycopg2 library. When i tried on my local desktop, it works fine, but when i upload the code to the AWS lambda and test it, it throws the error:
Unable to import module 'lambda_function': No module named 'psycopg2._psycopg'
I tried to pip install psycopg2 to the local folder on my pc where I saved the local copy of my lambda_function, and then created a zip out of it and uploaded it. But still its not working. Anyone who has faced similar issue, please advise.
I have installed python 3.7 (32 bit) on my local. Not sure if AWS version of python is 64 bit or not.