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

lambdaRole custom roles #87

Closed
bencodner opened this issue Jan 3, 2018 · 5 comments
Closed

lambdaRole custom roles #87

bencodner opened this issue Jan 3, 2018 · 5 comments

Comments

@bencodner
Copy link

bencodner commented Jan 3, 2018

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.

@HyperBrain
Copy link
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
Copy link
Member

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

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

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

@sakichan
Copy link

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

@Enase
Copy link
Contributor

Enase commented May 10, 2019

closed by #157

@Enase Enase closed this as completed May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants