Skip to content

lambdaRole custom roles #87

@bencodner

Description

@bencodner

alias deployments with function level roles/custom IAM roles don't work the same as core Serverless (Serverless empowers you to define custom roles and apply them to your functions on a provider or individual function basis). lambdaRole will use the currentRoles only if a provider role is present.

My service is setup to use the Cloudformation import value function for setting a KMS decryption role on a function. This role is an output of another stack (role: { "Fn::ImportValue": "KmsDecryptRoleName${self:custom.stage}" }). Without the alias plugin, the function gets the correct role and the rest of the functions get the default (Serverless generated) role.

After reading the code, I'm using a workaround of setting the role on the provider, however It's really only necessary on the one function.

Activity

HyperBrain

HyperBrain commented on Jan 4, 2018

@HyperBrain
Member

Hi @bencodner . Thanks for reporting the issue. It is a good idea to have per function roles fully supported.
If you have an idea how to implement it (and have some time) you could help and provide a PR with a proper solution?

HyperBrain

HyperBrain commented on Jan 4, 2018

@HyperBrain
Member

Oh, just saw the PR ;-) Thanks will review it soon.

added this to the 1.6.0 milestone on Jan 24, 2018
modified the milestones: 1.6.0, 1.7.0 on Mar 7, 2018
removed this from the 1.7.0 milestone on Mar 22, 2018
dsolonenko

dsolonenko commented on Sep 18, 2018

@dsolonenko

Hello @HyperBrain, any update on this? Would be great to make the aliases work with serverless-iam-roles-per-function plugin

sakichan

sakichan commented on Nov 26, 2018

@sakichan

Hello @HyperBrain , I sent PR to fix this.
Hello @dsolonenko , my PR will work with serverless-iam-roles-per-function plugin.

Enase

Enase commented on May 10, 2019

@Enase
Contributor

closed by #157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @dsolonenko@Enase@HyperBrain@bencodner@sakichan

      Issue actions

        lambdaRole custom roles · Issue #87 · serverless-heaven/serverless-aws-alias