AWS CloudFormation Least-Privilege Roles Can Fail Due to Hidden Cross-Service API Calls
AWS CloudFormation execution roles scoped strictly to visible template services can still fail with AccessDenied errors because CloudFormation's resource providers internally call APIs from adjacent AWS services. Two real-world examples illustrate this: creating an Application Load Balancer required the EC2 permission ec2:GetSecurityGroupsForVpc, and associating a Web ACL required load-balancer-side permissions beyond standard WAF access. These failures occur because CloudFormation's actual API behavior is driven by provider-side implementation, not just the service namespaces listed in the template. Rather than responding by attaching broad managed policies, engineers should treat each AccessDenied message as precise evidence and grant only the specific denied action, using condition keys to limit scope. AWS documentation and integration paths can also evolve over time, so permission sets should be validated against current denied actions rather than static historical lists.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in