Coding AWS lambda with ESNext
$ npm install
$ npm run build
NOTE: You need to manually create a function on AWS Lambda with the same name for the first time, then using this command to update it.
$ npm run publish
Q: Runtime.ImportModuleError
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module 'index'"
A: Change the handler from index.handler
to dist/index.handler
![]() |
---|