aws-lambda Cannot find module

前端 未结 12 737
野性不改
野性不改 2020-12-06 04:20

I keep getting this error in the aws-lambda console when uploading code from a zip file. I have tried uploading other zip files and they work correctly. The .js file is name

12条回答
  •  囚心锁ツ
    2020-12-06 05:11

    File Name:
    app.js
    Lambda Function in "app.js":
    exports.handler = function(event, context)...
    Lambda Handler on Amazon Console:
    app.handler ({app}.js + exports.{handler} = app.handler)

    When you unzip the folder, you should see:
    app.js
    node_modules

提交回复
热议问题