Learning center

Diagnose a cross-account AssumeRole denial

If STS refused the role assumption, inspect the caller's ability to call sts:AssumeRole and the target role's trust policy. Permissions attached to the target role govern work performed after assumption.

In an illustrative incident, account 111122223333 has a role named LedgerJob allowed to assume arn:aws:iam::444455556666:role/LedgerReader. A deployment changed its worker to use LedgerJobV2. The new role's policy allows the same STS call, while the target trust policy names only LedgerJob. An administrator can read the trust policy directly with GetRole.

aws iam get-role --role-name LedgerReader \
  --query 'Role.AssumeRolePolicyDocument'

Run that inspection in the target account. Compare the trusted principal and any conditions with the evidence from the failed STS call. If LedgerJobV2 is the approved caller, ask the target account owner to review trust for that role and retain the applicable conditions. If the policy is already correct for the recorded principal, inspect the caller's limiting policies before expanding trust. IAM cross-account evaluation · STS AssumeRole · GetRole

Trace another denied request.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading