A teammate says "just give it AdministratorAccess to get unblocked". How do you handle it properly?
BeginnerScenarioIAM, Organizations and Multi-Account
Answer
Situation read → Least privilege can be reached fast by letting AWS tell you what the app actually used.
What I'd do →
- Allow the broad permission only in a dev account for a short window
- Run the workload, then use IAM Access Analyzer policy generation from CloudTrail: it builds a policy from observed calls
- Review the draft, replace wildcards with ARNs, and apply it
- Remove the admin policy and check
aws iam get-rolefor attached policies
Why → Generated policies come from real activity so they are tighter than guesses.
Interview tip → Mention Access Analyzer unused-access findings for cleanup later.
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