Interview Prep/AWS/IAM Best Practices

How do you detect and clean up unused roles and permissions?

IntermediateProductionIAM Best Practices
Answer

Enable IAM Access Analyzer unused access analysis at the org level; it reports unused roles, unused access keys, unused passwords and unused services/actions within policies over a tracking period you choose. Combine with RoleLastUsed from aws iam get-role. Our process: auto-ticket the owner (from tags), wait 30 days, detach policies, wait again, delete. Never delete roles referenced by Lambda, ECS or trust policies without checking.

aws All AWS questions Roadmap: AWS core services

More on IAM Best Practices