New IAM role says 'not authorized' — propagation delay
Freshly created role fails with AccessDenied/not authorized
Focused incident mode — strips away everything but this runbook.
Symptoms
- Freshly created role fails with AccessDenied/not authorized
- Same calls succeed minutes later without any change
- Issue appears right after a role or policy was created/updated
IAM is eventually consistent — 95%+ of 'not authorized' moments after a role/policy change are just propagation, not misconfiguration. Wait-and-retry is the correct first move; dig deeper only if it persists for tens of minutes.
Evidence to grab
Collect these artifacts before you change anything — they prove (or rule out) each cause.
Role existence
aws iam get-role --role-name <ROLE-NAME>Policies attached
aws iam list-attached-role-policies --role-name <ROLE-NAME> --no-cli-pager
Diagnostic flow
Run the steps in order, marking each claim confirmed or refuted. The evidence you gather feeds the ranked causes below.
Guided decision tree is ready.
Steps with commands, expected output, and pass/fail branches.
Ranked root causes
Evidence checklist
- Failure began at the moment the role or policy was created
- Retries succeed seconds/minutes later without changes
Confirm before fixing
aws iam get-role --role-name <ROLE-NAME> --query 'Role.CreateDate' && date -uCompare role age to first failure time
Fix
sleep 30 && aws sts get-caller-identityWait out the propagation window and re-test
Expected: Identity resolves (no error)
Resolution runbook
Apply from top to bottom after the cause is confirmed. Review every command before running it — risk tags are shown on each.
aws iam get-role --role-name <ROLE-NAME>Confirm the role exists
aws iam list-attached-role-policies --role-name <ROLE-NAME>Confirm policies are attached and correct
sleep 30 && <retry-the-failing-command>Retry after the consistency window
aws sts get-caller-identityConfirm the session now resolves as expected
Prevention
- Build a small settle delay into pipeline steps that create roles then use them.
- Do not cache credentials longer than the IAM change window in long-lived workers.
- Pre-create roles ahead of releases that reference them.
Related runbooks
Same stack, same failure family — worth a skim.
App or pipeline fails with 'not authorized to perform sts:AssumeRole'
aws s3 ls s3://<BUCKET>/ fails with AccessDenied on the instance
Invoke returns 403 'The provided execution role does not have permissions'
Commands marked READ CHANGE DESTRUCTIVE — never run DESTRUCTIVE commands against production data you cannot restore. Copy → verify → execute.