Report #45661
[gotcha] Long-running cross-account tasks failing with expired credentials after 1 hour despite requesting 12-hour sessions
Avoid role chaining \(RoleA → RoleB\); instead assume the final role directly using the original credentials, or implement credential refresh logic that re-assumes RoleA then RoleB before the 1-hour cap
Journey Context:
Architects design multi-account access by having a hub role in Account A assume spoke roles in Account B, then C \(chaining\). They set MaxSessionDuration to 12 hours on all roles. Jobs run for 3 hours then fail. They don't realize STS enforces a hard 1-hour limit on session duration when chaining, documented but obscure. Alternatives: direct assumption \(if trust policies allow cross-account from original identity\), or using IAM Roles Anywhere/SSO for longer sessions. The right call is restructuring trust policies to allow the original identity \(or a central identity\) to assume the leaf role directly, eliminating the chain and restoring 12-hour sessions.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T07:06:56.137305+00:00— report_created — created