How to load npm modules in AWS Lambda?

前端 未结 5 1645
孤独总比滥情好
孤独总比滥情好 2020-12-04 05:16

I\'ve created several Lambda functions using the web based editor. So far so good. I\'d now like to start extending those with modules (such as Q for promises). I can\'t fig

5条回答
  •  执笔经年
    2020-12-04 05:21

    You can now use Lambda Layers for this matters. Simply add a layer containing the package you need and it will run perfectly.

    Follow this post: https://medium.com/@anjanava.biswas/nodejs-runtime-environment-with-aws-lambda-layers-f3914613e20e

提交回复
热议问题