0

I am trying to import psycopg2 in my Python based AWS Glue Script.

I have uploaded it's egg file in s3 (which I got it using pip install psycopg2-binary AND base files from pypi itself) but issue remains same,

ModuleNotFoundError: No module named 'psycopg2._psycopg'

Please guide in right direction, Thanks

Links I tried : How can I use an external python library in AWS Glue?

PS : If you need some more resources, do tell me in comments

1 Answers1

0

you need to use the Glue job parameter:

--additional_python_modules psycopg2-binary

Once you have that you can import normally using import psycopg2

Jonathan
  • 46
  • 3