Reputation: 38
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/
Upvotes: 0
Views: 5918
Reputation: 21530
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.
Upvotes: 3