AWS Lambda Function is returning “Cannot find module 'index'” yet the handler in the config is set to index

后端 未结 7 1105
青春惊慌失措
青春惊慌失措 2021-01-31 15:51

As my title explains I am getting the following error:

 {
  \"errorMessage\": \"Cannot find module \'index\'\",
  \"errorType\": \"Error\",
  \"stackTrace\": [
          


        
7条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-31 16:39

    make sure in your handler following code added

    exports.handler =  (event, context, callback) => {
    ...
    }
    

提交回复
热议问题