How would you let developers create IAM roles for their apps without letting them escalate to admin?
IntermediateScenarioIAM, Organizations and Multi-Account
Answer
Situation read → This is the classic delegated-administration problem; solve it with permissions boundaries.
What I'd do →
- Define a boundary policy that caps what any app role can ever do (for example no IAM, no Organizations)
- Give developers
iam:CreateRoleandiam:AttachRolePolicyonly with conditioniam:PermissionsBoundaryequal to the boundary ARN - Deny
iam:DeleteRolePermissionsBoundary - Prefix-scope with a path such as
role/app/*
Why → Effective permissions are the intersection of identity policy and boundary, so any role they create stays inside the cage.
Interview tip → Name the escalation path you are blocking: create a role with AdministratorAccess and assume it.
More on IAM, Organizations and Multi-Account
A developer needs read-only access to one S3 bucket from their laptop. How do you grant it without creating long-lived access keys?BeginnerAn EC2 application needs to write to DynamoDB. Where do the credentials come from?BeginnerSecurity wants to know who deleted a production S3 bucket yesterday. How do you find out?BeginnerYou must stop anyone in a member account from disabling CloudTrail, even account admins. What do you use?BeginnerA cross-account role assumption fails with AccessDenied even though the target role trusts the source account. What do you check?IntermediateDesign access for a CI pipeline in GitHub Actions to deploy to AWS without storing AWS keys in GitHub.Intermediate