-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
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.