Unable To Import Modules From Aws Lambda Layer
I have a requirements file for my pip packages. I installed it in a target folder and zipped the contents and uploaded it on AWS lambda layer. Requirements.txt asgiref==3.2.3 certi
Solution 1:
If layer would suite you, I can let you know that I just successful constructed a django layer based on your requirements.txt
file which could be imported in lambda.
To build the layer I used lambci/lambda tool. To ease the process, I used the following snippet from here.
The layer had 42 MB which is close to the 50 MB limit of lambda.
If you don't want to use layer, you can also use the same docker tool to build regular deployment package as explained in the recent AWS blog:
Since layer works, including django in a regular package should also work.
Post a Comment for "Unable To Import Modules From Aws Lambda Layer"