When I use the plugin (v1.2.0) with the latest serverless version (2.16.1) my local lambda invocations fail with:
TypeError: Cannot read property 'runtime' of undefined
at AwsInvokeLocal.getRuntime (/home/amroz/personal/link-shortener/node_modules/serverless/lib/plugins/aws/invokeLocal/index.js:56:62)
at AwsInvokeLocal.invokeLocal (/home/amroz/personal/link-shortener/node_modules/serverless/lib/plugins/aws/invokeLocal/index.js:209:26)
at Object.invoke:local:invoke [as hook] (/home/amroz/personal/link-shortener/node_modules/serverless/lib/plugins/aws/invokeLocal/index.js:50:41)
at /home/amroz/personal/link-shortener/node_modules/serverless/lib/classes/PluginManager.js:521:55
From previous event:
at PluginManager.invoke (/home/amroz/personal/link-shortener/node_modules/serverless/lib/classes/PluginManager.js:521:22)
at /home/amroz/personal/link-shortener/node_modules/serverless/lib/classes/PluginManager.js:556:24
From previous event:
at PluginManager.run (/home/amroz/personal/link-shortener/node_modules/serverless/lib/classes/PluginManager.js:556:8)
at /home/amroz/personal/link-shortener/node_modules/serverless/lib/Serverless.js:203:33
at processImmediate (internal/timers.js:439:21)
at process.topLevelDomainCallback (domain.js:131:23)
From previous event:
at Serverless.run (/home/amroz/personal/link-shortener/node_modules/serverless/lib/Serverless.js:190:74)
at /home/amroz/personal/link-shortener/node_modules/serverless/scripts/serverless.js:50:26
it happens regardless if I use --body switch or not.
I debugged it a little bit and it turns out that after the plugin is enabled in the serverless.yml file, AwsInvokeLocal.options.functionObj is undefined, while without the plugin it contains properties like name, events, description, handler.
When I use the plugin (v1.2.0) with the latest serverless version (2.16.1) my local lambda invocations fail with:
it happens regardless if I use
--body
switch or not.I debugged it a little bit and it turns out that after the plugin is enabled in the
serverless.yml
file,AwsInvokeLocal.options.functionObj
is undefined, while without the plugin it contains properties likename
,events
,description
,handler
.