0

I am trying to use SQL Alchemy in AWS Lambda function but it is throwing error:

module not found.

Also I am attaching the folder structure which I am deploying to Lambda layer after zipping.

I am using the following command to create the folder for lambda layer.

pip3 install sqlalchemy --target Alchemy_layer/

enter image description here

1 Answer 1

3

The layer needs a different folder structure according to the documentation.

Try this:

pip3 install sqlalchemy --target python/
zip -r sqlalchemy-layer.zip python/

Upload that ZIP as layer and try again.

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

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.