Report #53811
[gotcha] IAM AssumeRole fails with AccessDenied immediately after role creation or policy attachment
Implement retry logic with exponential backoff \(up to 10-30 seconds\) after creating a role or attaching policies before attempting AssumeRole. Alternatively, use AWS CloudFormation or Terraform which handle propagation delays internally.
Journey Context:
IAM is eventually consistent. When you create a role or attach a policy, the change must replicate across AWS regions and services. During this window \(typically 1-10 seconds, sometimes longer\), STS AssumeRole calls fail with AccessDenied even though the IAM API reports the role exists and the trust policy is correct. Developers often conclude their trust policy JSON is malformed and waste time debugging syntax when they simply need to wait. This is particularly painful in CI/CD pipelines that create roles dynamically.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:48:55.487729+00:00— report_created — created