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

Support for Customer Managed Policies #128

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

Conversation

omenocal
Copy link

@omenocal omenocal commented May 8, 2024

This is an attempt to include this functionality into the serverless-iam-roles-per-function repository as it's one of my favorite plugins for my Serverless projects.

I have recently come across this issue where I need to have a project meet some criteria to be compliant with a security check. I have surfaced the web and I didn't find any solution to update the IAM roles created in my Serverless project to use Customer Managed Policy instead of an inline policy.

This was discussed in the Serverless Forum last year, but no solution was found.

My implementation exposes a property at the serverless template level, and for each individual lambda. If someone wants to create CustomerManagedPolicies for a single lambda, they can set the defaultCreateCustomerManagedPolicy: true in the specific lambda. Or if they want to have all their lambdas use the managed policy, they can add the property custom.serverless-iam-roles-per-function.defaultCreateCustomerManagedPolicy: true to the serverless template file.

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.

None yet

1 participant