serverless-heaven / serverless-aws-alias

Alias support for Serverless 1.x
MIT License
189 stars 68 forks source link

Removal of IAM policy statements sometimes does not remove the policy in IAM #36

Closed HyperBrain closed 7 years ago

HyperBrain commented 7 years ago

It happens that, if a policy statement in "IamLambdaRoleExecution" that references an external resource is removed, the statement will actually not be removed.

This causes no runtime failures, but should be handled correcty, i.e. the policy statement should be removed afterwards.

A better solution to handle policies and aliases than the current one is, that the plugin should create one role per alias and set the lambda role for the aliased function versions correctly. This has the advantage that each user can deploy completely different access policies per alias.