Skip to content

Multiple permissions and roles created during deployment #285

@pradeepd12

Description

@pradeepd12

I deployed my infrastructure using SAM. After deployment, this is the list/count of resources:

 47 AWS::Lambda::Permission
 25 AWS::Lambda::Function
 24 AWS::IAM::Role

The deployment model (yaml) policies are currently set to 'AdministratorAccess' for each lambda function.

Why are all these permissions being created and how can I reduce the number? Has anyone experienced this? While browsing the cloudformation stack, I noticed that the logical ID of these permissions has a naming convention; ProxyApiRootPermissionStage and ProxyApiRootPermissionTest (roughly 2 permissions per function)

PS: Instead of the 'policies' property (in the YAML), I added the 'role' (predefined role ARN) to each lambda function. That brought down the number of roles to 1.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions