fix: align OIDC role duration and SSM poll timeout with shutdown timer#21411
Merged
randyquaye merged 1 commit intonextfrom Mar 12, 2026
Merged
Conversation
ludamad
approved these changes
Mar 12, 2026
…meout with shutdown timer The OIDC role-duration-seconds was unset (defaulting to 1h), and the SSM poll timeout was hardcoded to 7200s. Both were too short for long-running jobs like ci-network-scenario (6h) and ci-network-kind (3h), causing RequestExpired errors on cleanup and orphaned EC2 instances. Additionally, AWS-RunShellScript executionTimeout defaults to 3600s (1h), silently killing SSM commands server-side before the poll loop notices. This commit: - Sets role-duration-seconds per job to cover max shutdown time + buffer - Derives SSM_POLL_TIMEOUT from AWS_SHUTDOWN_TIME instead of hardcoding - Adds executionTimeout to SSM document parameters to match the poll timeout
9ab5e25 to
a4b68f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ci-network-scenariosetAWS_SHUTDOWN_TIMEto 360 min (6h). When polling exceeded the OIDC credential lifetime, the subsequentterminate-instancescall failed withRequestExpired.SSM_POLL_TIMEOUTfromAWS_SHUTDOWN_TIME+ 10 min buffer so it always outlasts the shutdown timer.role-duration-secondson each OIDC step to match the job's shutdown timer + 30 min buffer.cici-network-scenarioci-network-kindTest plan
MaxSessionDurationis >= 23400s (6.5h) — if not, update it in AWSci-network-scenariojob and confirm noRequestExpirederrors on cleanup