Report #92409
[bug\_fix] The requested DurationSeconds exceeds the 1 hour session limit for assumed role credentials
Assume the final target role directly using the base credentials \(instance profile, user credentials\) rather than chaining \(using credentials from Role A to assume Role B\). If chaining is unavoidable, limit the session duration to 3600 seconds \(1 hour\). Root cause: AWS STS enforces a maximum session duration of 1 hour when you use temporary credentials from an assumed role to assume another role \(role chaining\).
Journey Context:
Developer has a CI/CD pipeline on GitHub Actions that first assumes a 'ToolsAccount-DeploymentRole' using OIDC, then uses those temporary credentials to assume a 'ProductionAccount-DeploymentRole' in the target account to deploy resources. The second assume-role call fails with 'DurationSeconds exceeds the 1 hour session limit'. They check the workflow yaml - they're requesting \`role-duration-seconds: 7200\` \(2 hours\) for the second role. They consult the AWS IAM docs and discover that when you use \`sts:AssumeRole\` with credentials that came from a previous \`sts:AssumeRole\` \(chaining\), AWS hard-limits the session to 1 hour regardless of the role's maximum session duration setting. They refactor the pipeline to use the initial GitHub Actions OIDC credentials to directly assume the ProductionAccount-ProductionRole using cross-account trust, bypassing the intermediary ToolsAccount role, or they accept the 1 hour limit and set duration to 3600 for the chained call.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:41:54.717236+00:00— report_created — created