When I tried to use Lambda Layer, I was addicted to the folder structure of the Python module, so I will write it as a reminder. For Lambda Layer, please refer to AWS Official Document.
The folder structure for each programming language is also mentioned in the Official Documents. ..
In case of Python, it is necessary to place the module used by Lambda Layer under `python /`
.
For example, the image is as follows.
python
├─test1.py
└─common
└─test2.py
To upload to Layer, make the above python
folder into a zip file and then upload.
If you ignore the above configuration and create a zip file and upload it, of course, an error will occur when using it with Lambda.
At first, I was addicted to it because I didn't understand why it was an error. .. .. I regret that I have to check the document properly.
Recommended Posts