0

Before someone marks this as a duplicate, I've reviewed No module named 'psycopg2._psycopg': ModuleNotFoundError in AWS Lambda

and attempted as best as I can the steps listed in this repo: https://github.com/jkehler/awslambda-psycopg2

I'm building a web application in AWS Amplify which packages the lambda itself so regardless of using his precompiled options or generating it myself from scratch, I am unsure where I would even put the folder. I tried several places but I keep getting the error:

Unable to import module 'index': No module named 'psycopg2._psycopg

I also tried a lambda layer from this repo with the same result: https://github.com/jetbridge/psycopg2-lambda-layer

So is there a specific place I should put the generated folder? Is there a lambda layer that works?

2 Answers 2

1

So instead of actually finding the answer to this question I built a lambda layer with the psycopg2 library provided in the first repo and uploaded it, then it worked!

Sign up to request clarification or add additional context in comments.

Comments

0

So amplify CLI doesn't really manage functions. We used amplify to be able to manage functions but it had an unfortunate library error and had to be done manually

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.