Nobody sets out to grant a role full administrator access
It happens the way most cloud security problems happen. A deployment fails on a Friday, somebody widens a policy to unblock it, and the comment that says tighten this later outlives the person who wrote it. Three years on, the role has forty permissions and nobody can say which eight it actually uses.
The fix is not a policy document. It is a method for reducing permissions while controlling the risk to production. Here is the one we use.
Start from what the role did, not from what it is allowed to do
The permissions attached to a role tell you the ceiling. They tell you nothing about the floor. The useful question is narrower: in the last ninety days, which API calls did this role actually make?
AWS already answers this. IAM Access Analyzer generates a policy from CloudTrail history, and IAM's last-accessed data shows which services a role has not touched in months. Both are free, and both are more honest than any architecture diagram.
Read the generated policy and expect it to surprise you. A role that everyone believed was read-only turns out to write to a bucket once a quarter. A role nobody could explain turns out to be doing nothing at all.
Watch out for the long tail
Ninety days of history misses the annual job. It misses the disaster-recovery path that has never run. It misses the quarterly reconciliation that touches three services nothing else touches.
So before you cut anything, ask the team one question: what does this system do that it does not do every week? Write the answers down. Those paths are the ones that break at the worst possible time, because nobody tests them and nobody remembers them.
Test the candidate, then roll it out in stages
Attaching a narrower Allow policy beside a broader Allow policy does not narrow effective permissions. The broad policy can still allow the request. AWS does not produce a hypothetical-denial alarm just because the narrower policy is attached.
First: evaluate the candidate separately. Compare observed CloudTrail actions, resources and request context against the candidate policy using the IAM policy simulator. Test the candidate without the broad policy, supply the condition keys it needs, and include the other policy types relevant to the role. Check the simulator's supported scenarios and limitations; its result can differ from the live environment, particularly for resource policies and cross-account access.
Exercise representative workflows in a non-production environment with the intended effective permissions. Include scheduled jobs, recovery paths and the long-tail operations your team identified. A quiet log is evidence only about the requests you observed; it does not prove that unobserved paths will work.
Then: stage the production change. Agree a change window and rollback plan, apply the narrower permissions to a small initial scope, and monitor actual AccessDenied errors and application health. Keep the previous policy version ready to restore. Expand only after representative workflows succeed and the technical owner accepts the remaining coverage gaps.
Simulation and live testing reduce the risk; neither guarantees an outage-free change. Record the scenarios tested and the assumptions still outstanding alongside the policy.
AWS references: policy evaluation logic and IAM policy simulator capabilities and limitations.
Write it as code, or it will not survive
A permission tightened in the console is a permission that drifts back. Somebody will widen it next Friday and there will be no record of why it was narrow.
Put the policy in your infrastructure repository. Raise it as a pull request. Make the pull request description say what the role does and what it must never do. That description is the only documentation anyone will read, because it sits next to the thing it describes, and because the next person to widen the policy has to walk past it.
Prefer conditions over new roles
When two consumers need almost the same access, the instinct is to create a second role. Resist it for a moment. Often a condition on the existing policy — a source account, a tag, a resource prefix, a requirement for a particular session context — expresses the difference more precisely than a whole new identity does.
Fewer roles that are each precisely scoped beat many roles that are each vaguely scoped. Every role you add is one more thing somebody has to reason about during a review.
What your reviewers are actually asking for
When a security reviewer asks about least privilege, they are rarely asking for a policy document. They are asking a simpler question that most teams cannot answer: if this credential leaked right now, what would the attacker reach?
A role whose policy was generated from observed behaviour, tested and rolled out in stages, and committed as code lets you answer that question in a sentence and show the evidence. That is what ends the conversation. Not a diagram, and not an assurance.
Where to start this week
Do not begin with the hardest role. Begin with the one that scares you most if it leaked, which is usually a deployment role or a data-processing role rather than a human one. Generate its policy from CloudTrail. Read it. Ask the team about the long tail. Test the candidate and stage the rollout.
One role, done properly, teaches your team the method. The second one is faster, and by the fifth it is just how your team works.
If you would rather have someone run this across your estate and hand you the ranked list, our free Well-Architected Review starts with exactly this question.