Ask Your Question
1

What is the issue with importing psycopg2 in AWS Glue?

asked 2022-02-04 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-07-12 07:00:00 +0000

nofretete gravatar image

There could be different issues related to importing psycopg2 in AWS Glue, but one common issue is that the required psycopg2 library might not be available in Glue's default Python environment. Glue provides a pre-installed Python environment with some commonly used libraries, but psycopg2 might not be included.

To resolve this issue, you can create a custom Python environment with psycopg2 and other required libraries and use it in your Glue job. You can create a conda environment with the required packages and upload it to S3, or you can use a Docker container with the required dependencies. Additionally, you might need to specify the custom environment in the Glue job's configuration settings.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-02-04 11:00:00 +0000

Seen: 11 times

Last updated: Jul 12 '21