I am working in the pyCharm IDE with the AWS serverless toolkit plugin
I am building for 3.6 or 3.7 on AWS
import psycopg2 in the py files
and aws-psycopg2 in the requirements.txt
using aws-psycopg2 rather than psycopg2-binaries seems to get me past the problem "Unable to import ... undefined symbol: PyUnicodeUCS4_DecodeUTF8" which is to be a big step forward... But I now have a different problem...
When I run with the local environment I have psycopg2 2.8.4 for the interpreter - all good
When I run in a local debug docker container (lambci/lambda:python3.6 or 7) - all good
BUT: When i deploy to lambda the loader throws
"Unable to import module 'app': No module named 'psycopg2._psycopg'" from cloudwatch
do i need additional items in my Requirements.txt or some other form of import statement?
I am finding it confusing that it works in the docker container and not in the cloud...
Any direction would be greatly appreciated... Thanks....
Hi. I actually found the problem about an hour after posting.. the template.yaml file was specifying Runtime: python2.7... I have no idea how it got set to that but changing it to 3.7 did the trick...
I am working in the pyCharm IDE with the AWS serverless toolkit plugin
I am building for 3.6 or 3.7 on AWS
using aws-psycopg2 rather than psycopg2-binaries seems to get me past the problem "Unable to import ... undefined symbol: PyUnicodeUCS4_DecodeUTF8" which is to be a big step forward... But I now have a different problem...
When I run with the local environment I have psycopg2 2.8.4 for the interpreter - all good When I run in a local debug docker container (lambci/lambda:python3.6 or 7) - all good BUT: When i deploy to lambda the loader throws "Unable to import module 'app': No module named 'psycopg2._psycopg'" from cloudwatch
do i need additional items in my Requirements.txt or some other form of import statement?
I am finding it confusing that it works in the docker container and not in the cloud...
Any direction would be greatly appreciated... Thanks....