Report #78318
[gotcha] STS AssumeRole fails with max session duration error when assuming a role that was already assumed
When using role chaining \(using credentials from AssumeRole to call AssumeRole again\), the second session is limited to 1 hour regardless of the role's MaxSessionDuration setting. Use the final target role's credentials directly \(e.g., via AWS CLI profiles with source\_profile and role\_arn pointing to final role\) rather than chaining, or accept the 1-hour limit.
Journey Context:
Developers often create 'jump' roles for security \(e.g., assume Role A, then use those creds to assume Role B\). AWS limits chained role sessions to 1 hour maximum for security, even if Role B's trust policy allows 12 hours. This causes production jobs to fail mid-run after 1 hour with 'The requested DurationSeconds exceeds the 1 hour session limit'. Teams often blame the role configuration, but it's the chaining architecture itself.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T14:02:59.814355+00:00— report_created — created