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

后端 未结 7 1189
青春惊慌失措
青春惊慌失措 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:34

    I had the same problem sometime ago - I reformatted the code.

    function lambdafunc1(event, context) {
    ...
    ...
    ...
    }
    
    exports.handler = lambdafunc1
    

提交回复
热议问题