Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run sample project on aws lambda #55

Open
firnandessicepat opened this issue May 20, 2020 · 1 comment
Open

Cannot run sample project on aws lambda #55

firnandessicepat opened this issue May 20, 2020 · 1 comment

Comments

@firnandessicepat
Copy link

Hi I am trying to use this awesome framework, but unfortunately the code won't run on aws lambda with this error:

{
  "errorType": "Runtime.HandlerNotFound",
  "errorMessage": "index.handler is undefined or not exported",
  "trace": [
    "Runtime.HandlerNotFound: index.handler is undefined or not exported",
    "    at Object.module.exports.load (/var/runtime/UserFunction.js:144:11)",
    "    at Object.<anonymous> (/var/runtime/index.js:43:30)",
    "    at Module._compile (internal/modules/cjs/loader.js:1156:30)",
    "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1176:10)",
    "    at Module.load (internal/modules/cjs/loader.js:1000:32)",
    "    at Function.Module._load (internal/modules/cjs/loader.js:899:14)",
    "    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)",
    "    at internal/main/run_main_module.js:18:47"
  ]
}

I follow this step:

  1. serverless install --url https://github.com/AnomalyInnovations/serverless-nodejs-starter --name my-project
  2. cd my-project
  3. npm install
  4. serverless deploy (but it's error because i havn't setup my aws account to allow cloudformation stack)
  5. So, i upload the file manually to my aws-lambda function. I upload zip from .serverless/hello.zip
  6. Uploaded finished and i saved the code, run the test
  7. Result is error

Please help me thanks

@jayair
Copy link
Member

jayair commented May 30, 2020

I haven't tried manually uploading it. And it seems like that doesn't work because the error is complaining about index.handler which we don't have defined in this starter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants