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

Serverless 2.0 support #203

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nason
Copy link

@nason nason commented Feb 23, 2021

I've been running into issues with this plugin as I upgrade the serverless and nodejs versions for my projects.

When I tried to use the latest serverless (2.25.2) and Node LTS 14.15.0, I started getting errors like:

  TypeError: this.aliasStackGetAliasStackNames(...).mapSeries is not a function
      at AwsAlias.aliasStackLoadAliasTemplates (/project/node_modules/serverless-aws-alias/lib/stackInformation.js:82:4)
      at AwsAlias.tryCatcher (/project/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/project/node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (/project/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromiseCtx (/project/node_modules/bluebird/js/release/promise.js:641:10)
      at _drainQueueStep (/project/node_modules/bluebird/js/release/async.js:97:12)
      at _drainQueue (/project/node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (/project/node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (/project/node_modules/bluebird/js/release/async.js:15:14)
      at processImmediate (internal/timers.js:461:21)

I started down the path of getting through that, and think I fixed it in 0872d2e, but then went further and migrated to support serverless 2.0.

The tests pass, and I'm going to give my fork a spin -- not sure if I went too far with this PR, I'd be happy to remove the 2.0 commit ⚠️

@danmaas
Copy link

danmaas commented Apr 29, 2021

One more thing I noticed, as of serverless 2.38, the config provider.role has now become provider.iam.role.

So in lib/stackops/lambdaRole.js line 18:

	if (_.has(this._serverless.service.provider, 'role')) {

needs to become

	if (_.has(this._serverless.service.provider, 'iam.role')) {

@dnascimento
Copy link

@nason this is great! Could you update this PR and release a new version of this plugin for framework 2?

@Nicoowr
Copy link

Nicoowr commented Oct 13, 2021

any update on this?

@Nicoowr
Copy link

Nicoowr commented Oct 13, 2021

It feels like this package is deprecated since Serverless v3 is already announced :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants