The IAM Policy Versioning Pattern
Most teams treat IAM policies as fire-and-forget. The versioning pattern that lets you reason about policy changes safely.
Policies in git
Each policy in its own JSON file. Reviewed via PR.
Diff is human-readable; audit trail is automatic.
Test policy changes
Use IAM policy simulator. Verify each change does what it intends and nothing else.
Unintended grants are the most common policy bug. Simulator catches them.
Rollback
Git revert + apply. Same operation as code rollback.
Policy that broke prod yesterday gets rolled back in a minute, not investigated for an hour.