question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Plugin fails starting from Serverless v2.5.0

See original GitHub issue

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: https://github.com/serverless/serverless/pull/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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:29
  • Comments:26 (2 by maintainers)

github_iconTop GitHub Comments

24reactions
glichtcommented, Nov 2, 2020

@theburningmonk @randomhash @andersquist @Enase thanks for offering your help. Really appreciated. I’ve added you to the repo with write access. So you will be able to approve and merge PRs.

Additionally, I’ve just deployed a pre-release of version 3.0.0 with the latest merged PRs: https://www.npmjs.com/package/serverless-iam-roles-per-function/v/3.0.0-d84bffd

I am also looking into automating the deployment process so at least for the next we will get an auto deploy once merged to master.

13reactions
Bril-Slscommented, Oct 7, 2020

Ran into this issue as well. We were able to find a temporary workaround by locking the version of serverless framework installed to a previous version. npm i serverless@2.4.0 -g

Read more comments on GitHub >

github_iconTop Results From Across the Web

Serverless + Plugins just keep giving new errors
I am trying to use the serverless-webpack plugin because a normal deployment gives a error in maximum zip file size. Here is my...
Read more >
Upgrading to Serverless Framework v3
First, upgrade to the latest v2 version and make sure that you do not get any deprecation warning when running serverless commands. Then,...
Read more >
Suddenly started getting error "Request is missing ...
All of a sudden serverless deploy command has started giving error in AWS with error: “Request is missing Authentication Token”. Serverless:
Read more >
Serverless Plugin Warmup
WarmUp solves cold starts by creating a scheduled lambda (the warmer) that invokes all the selected service's lambdas in a configured time interval ......
Read more >
Plugin Repository - Serverless Framework
The Serverless Framework features over 1000 community-authored plugins, including Offline, Custom Domains, AWS Lambda Warmer, Static Sites On S3, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found