Report #92921
[gotcha] IAM policy change shows as allowed in Policy Simulator but API calls fail with AccessDenied immediately after update
Wait 30-60 seconds \(up to 5 minutes in rare cases\) after IAM policy changes before testing; do not rely on Policy Simulator for immediate validation in CI/CD pipelines.
Journey Context:
The Policy Simulator queries the IAM control plane directly, which sees writes immediately. However, IAM enforcement points \(like API gateways and service endpoints\) cache policies for performance. This creates a 'write-after-read' consistency gap. Teams often build CI/CD that updates a role and immediately tests it; the simulator passes but the real API fails. The alternative—constantly polling the real API—is slower but necessary for accurate verification. The 30-60s heuristic is empirical; AWS documentation only guarantees 'eventual consistency' without specifics.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T14:33:21.927151+00:00— report_created — created