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

TypeError occurs with custom resource Lambdas: Cannot read property 'Errors' of undefined #67

Closed
eoinsha opened this issue Oct 25, 2021 · 0 comments · Fixed by #69
Closed
Assignees
Labels
bug Something isn't working

Comments

@eoinsha
Copy link
Contributor

eoinsha commented Oct 25, 2021

Describe the bug
If an application includes custom resources with their own Lambda functions, the function-specific configuration is missing and results in a TypeError:


  TypeError: Cannot read property 'Errors' of undefined
      at createLambdaAlarms (/Users/eoin/workspace/fourTheorem/slic-starter/user-service/node_modules/serverless-slic-watch-plugin/alarms-lambda.js:26:22)
      at Object.addAlarms (/Users/eoin/workspace/fourTheorem/slic-starter/user-service/node_modules/serverless-slic-watch-plugin/alarms.js:43:7)
      at ServerlessPlugin.finalizeHook (/Users/eoin/workspace/fourTheorem/slic-starter/user-service/node_modules/serverless-slic-watch-plugin/index.js:83:17)
      at PluginManager.runHooks (/Users/eoin/workspace/fourTheorem/slic-starter/node_modules/serverless/lib/classes/PluginManager.js:565:41)
      at async PluginManager.invoke (/Users/eoin/workspace/fourTheorem/slic-starter/node_modules/serverless/lib/classes/PluginManager.js:602:9)
      at async PluginManager.spawn (/Users/eoin/workspace/fourTheorem/slic-starter/node_modules/serverless/lib/classes/PluginManager.js:626:5)
      at async before:deploy:deploy (/Users/eoin/workspace/fourTheorem/slic-starter/node_modules/serverless/lib/plugins/deploy.js:61:11)
      at async PluginManager.runHooks (/Users/eoin/workspace/fourTheorem/slic-starter/node_modules/serverless/lib/classes/PluginManager.js:565:35)
      at async PluginManager.invoke (/Users/eoin/workspace/fourTheorem/slic-starter/node_modules/serverless/lib/classes/PluginManager.js:602:9)
      at async PluginManager.run (/Users/eoin/workspace/fourTheorem/slic-starter/node_modules/serverless/lib/classes/PluginManager.js:663:7)
      at async Serverless.run (/Users/eoin/workspace/fourTheorem/slic-starter/node_modules/serverless/lib/Serverless.js:464:5)
      at async /Users/eoin/.n/lib/node_modules/serverless/scripts/serverless.js:830:9

To Reproduce
Using the slic-watch branch of SLIC Starter (https://github.com/fourTheorem/slic-starter)
sls package --region=eu-west-1 --stage stg in /user-service

Expected behavior
Alarms are created and packaged

@eoinsha eoinsha added the bug Something isn't working label Oct 25, 2021
@eoinsha eoinsha self-assigned this Oct 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant