serverless/serverless

Specify iamManagedPolicies for custom resources

Ouverte

#6 952 ouverte le 11 nov. 2019

 (9 commentaires) (0 réaction) (0 personne assignée)JavaScript (5 734 forks)batch import
cat/aws-iamenhancementhelp wanted

Métriques du dépôt

Stars
 (46 915 étoiles)
Métriques de merge PR
 (Merge moyen 1j 15h) (34 PRs mergées en 30 j)

Description

Feature Proposal

Allow ability to specify iamManagedPolicies for custom resources generated by Serverless.

Description

There currently exists an ability to include managed policies in the generated lambda execution role by providing an entry in iamManagedPolicies under the serverless.yml provider. We have some managed policies that need to be applied to all roles, so this works great.

However, I've recently tried using the S3 event with the "existing" flag set in order to have the lambda invoked based on S3 activity. When using "existing", there is an additional lambda function and IAM role added. This generated IAM role does not include the listed items in the provider iamManagedPolicies.

It would be very helpful to either be able to call out the iamManagedPolicies separately in the event config, or have it use the same configuration customization under "provider" that the lambda execution role uses.

Guide contributeur