简体   繁体   中英

Lambda Layer not loading Node Module during Runtime

I have two layers which each contain a single npm package. Neither are being recognized by Lambda as existing when testing the function. I get the error log: 在此处输入图像描述

The layers are

在此处输入图像描述

and "tensorflowJS" is a layer containing a zipped node package with tensorflowjs installed in the same runtime as the layer's function. Are there additional configurations I'm missing to run an ML model serverlessly?

What is the structure of the files within the zip you used for these layers?

The documentation shows some examples: 在此处输入图像描述

So make sure you have a nodejs folder inside the zip, then a node_modules folder within that, then your code within that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM