Increase AWS retry to 5 - #2148
Merged
Merged
Conversation
CloudFormation steps intermittently fail with "Rate exceeded". AWS SDK v4 uses Standard retry mode, which treats throttling as retryable but allows only 2 retries - not enough when deployments share an account and region. Set MaxErrorRetry explicitly for every AWS client. AWS doesn't publish CloudFormation request rate quotas, so the value widens the backoff window rather than matching a documented limit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
NickJosevski
force-pushed
the
nj/aws-raise-retry-budget-for-throttling
branch
from
August 26, 2026 07:48
a97d4bb to
3fc7c4b
Compare
NickJosevski
marked this pull request as ready for review
August 26, 2026 12:12
Contributor
Author
|
Backoff shape, for context on what raising this to 5 actually costs:
Caveat worth knowing: |
NickJosevski
enabled auto-merge (rebase)
August 26, 2026 23:40
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.
No server change required.
Background
CloudFormation steps intermittently fail with
AmazonCloudFormationException: Rate exceeded, surfaced byCloudFormationTests.ShouldDeployChangesetin Server CI (Chain: Full #2026.3.13729).The SDK's
RetryHandleris in the stack trace, so it had already retried. AWS SDK v4 (AWSSDK.Core4.0.100.9) defaults toStandardretry mode, which does treat throttling as retryable — butMaxErrorRetryis only 2.AsClientConfigleft that default in place.Results
All AWS clients (CloudFormation, S3, IAM, STS) get 5 retries instead of 2, so a transient throttle costs backoff rather than a failed deployment.
How to review this PR
AWS doesn't publish per-operation request rate quotas for CloudFormation — the quotas page documents no request rates at all — so
5can't be derived from a documented limit. The real measure is the throttle rate afterwards.Two things worth challenging: it applies to all AWS clients rather than just CloudFormation, and under sustained throttling a deployment now takes longer to fail. Adaptive retry mode would add client-side rate limiting and is arguably the better shape, but the SDK calls it "experimental", which felt wrong for the deployment hot path.
#2149 fixes how the failure is reported once retries are exhausted.