Serverless just released a new version of the npm package (https://github.com/serverless/serverless/releases/tag/v2.5.0) and the plugin started to fail with following error:
Error & stack trace
Type Error ---------------------------------------------
TypeError: this.awsPackagePlugin.validateStatements is not a function
at ServerlessIamPerFunctionPlugin.validateStatements (/home/circleci/repo/node_modules/serverless-iam-roles-per-function/dist/lib/index.js:49:31)
at ServerlessIamPerFunctionPlugin.createRoleForFunction (/home/circleci/repo/node_modules/serverless-iam-roles-per-function/dist/lib/index.js:189:14)
at ServerlessIamPerFunctionPlugin.createRolesPerFunction (/home/circleci/repo/node_modules/serverless-iam-roles-per-function/dist/lib/index.js:284:18)
at /snapshot/serverless/lib/classes/PluginManager.js:510:55
From previous event:
at PluginManager.invoke (/snapshot/serverless/lib/classes/PluginManager.js:510:22)
at /snapshot/serverless/lib/classes/PluginManager.js:545:24
From previous event:
at PluginManager.run (/snapshot/serverless/lib/classes/PluginManager.js:545:8)
at /snapshot/serverless/lib/Serverless.js:168:33
From previous event:
at Serverless.run (/snapshot/serverless/lib/Serverless.js:155:74)
at /snapshot/serverless/scripts/serverless.js:50:26
at processImmediate (internal/timers.js:456:21)
at process.topLevelDomainCallback (domain.js:137:15)
From previous event:
at Object.<anonymous> (/snapshot/serverless/scripts/serverless.js:50:4)
at Module._compile (pkg/prelude/bootstrap.js:1320:22)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1156:10)
at Module.load (internal/modules/cjs/loader.js:984:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Module.require (internal/modules/cjs/loader.js:1024:19)
at Module.require (pkg/prelude/bootstrap.js:1225:31)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/snapshot/serverless/bin/serverless.js:47:1)
at Module._compile (pkg/prelude/bootstrap.js:1320:22)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1156:10)
at Module.load (internal/modules/cjs/loader.js:984:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Function.Module.runMain (pkg/prelude/bootstrap.js:1375:12)
at internal/main/run_main_module.js:17:47
I found a PR, which caused this error: serverless/serverless#8297
Basically, the method, which was used to validate the iam statements, was removed from serverless package at all, so there should be a different way to validate the statements in order to align with the new versions of serverless.
Serverless just released a new version of the npm package (https://github.com/serverless/serverless/releases/tag/v2.5.0) and the plugin started to fail with following error:
Error & stack traceI found a PR, which caused this error: serverless/serverless#8297
Basically, the method, which was used to validate the iam statements, was removed from
serverlesspackage at all, so there should be a different way to validate the statements in order to align with the new versions ofserverless.