Report #11374
[gotcha] AccessDenied immediately after creating IAM role and attaching policy
Implement retry logic with exponential backoff \(up to 30s\) after IAM role creation before assuming the role via STS
Journey Context:
IAM is eventually consistent across global regions. Even if the CreateRole API returns success, the role isn't propagated to all STS endpoints immediately. Engineers often create a role and immediately run terraform apply or integration tests, getting sporadic AccessDenied errors that disappear on retry. The alternative of sleeping 30s fixed time slows CI/CD unnecessarily. Exponential backoff with jitter \(e.g., 1s, 2s, 4s, 8s\) is optimal—most propagation completes within 5-10s.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:12:39.180052+00:00— report_created — created