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

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

As my title explains I am getting the following error:

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


        
7条回答
  •  旧时难觅i
    2021-01-31 16:38

    If this was unclear for anyone else, here are the steps:

    Step 1 Navigate to the folder of your project, and open that folder so that you are inside the folder:

    Step 2 Select all of the images you want to upload into to Lambda:

    Step 3 Right-click and compress the files you have selected:


    This will give you a .zip file, which is the file you need to upload to Lambda:


    There are a lot of ways to automate this, but this is the manual procedure.

提交回复
热议问题