feat(article): adaptive retry mode terraform - #160
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds a blog post that explains AWS adaptive retry mode, compares it with standard retries, and documents scoped Terraform provider configuration for throttled API requests. ChangesAWS adaptive retry mode article
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md`:
- Line 83: Update the module provider guidance near the providers mapping to
explain that it applies only to modules using the default aws provider; instruct
callers to pass matching aliased provider keys and require child modules to
declare those aliases via configuration_aliases before reuse.
- Around line 36-40: Reframe the adaptive retry recommendation around a client
targeting one specific resource or API workload, rather than presenting a broad
Terraform run as a direct fit. Update the examples in the discussion around IAM,
ALB listener rules, and Route 53 to acknowledge that these span multiple
resources and may cause adaptive throttling to affect unrelated requests; narrow
the recommendation before suggesting providers that fan out across resource
families.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8579b199-ec9d-473f-9b17-d4973f99f485
⛔ Files ignored due to path filters (1)
static/img/updates/aws-adaptive-retry-mode-terraform/aws-adaptive-retry-mode.pngis excluded by!**/*.png
📒 Files selected for processing (1)
content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md
✅ Deploy Preview for masterpoint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md`:
- Line 90: In the closing example, update the phrase “multiple quick ones that
bounces” to use the grammatically correct “multiple quick ones that bounce,”
leaving the surrounding explanation unchanged.
- Around line 31-39: Reframe the adaptive-mode recommendation to apply only to
isolated AWS SDK client configurations targeting a single resource or workload.
Update the IAM, ALB, and Route 53 examples to clarify that broad Terraform runs
and provider aliases do not necessarily map to one client per resource, and
remove any implication that throttling impact is limited exactly to the selected
resources.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 2cf52c1d-f22b-4e6c-af3e-dc37fefab05f
📒 Files selected for processing (1)
content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md`:
- Line 56: Remove the stray underscore in the prose sentence so it reads “be
able to easily see,” preserving the surrounding Markdown and all other content.
- Around line 32-40: Revise the adaptive-mode recommendation in the paragraph
beginning “A big Terraform operation” to scope it to a single AWS SDK client
targeting one resource or API operation, rather than a broad Terraform run
spanning IAM, ALB, and Route 53. Replace “fits that description well” and the
related broad resource-selection wording with narrower client-scoped language,
and avoid implying that provider aliases guarantee separate SDK clients.
- Line 95: Rephrase the adaptive retry latency discussion in the paragraph
beginning “The important nuance” to acknowledge that throttling can delay
initial requests, rather than calling slower behavior a non-issue. Present the
delay as an acceptable trade-off for latency-tolerant workloads or narrowly
scoped resources where avoiding repeated throttled attempts is more important.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 405006f7-ee55-4c4d-b2ea-4325c510470e
📒 Files selected for processing (1)
content/blog/2026-07-26-aws-adaptive-retry-mode-terraform-throttled-api-requests.md
|
|
||
| This is because there are costs. **Typical operations get slower**, since delaying first attempts is the mechanism itself, so a Terraform or OpenTofu workspace that never gets throttled gains nothing and may still pay a latency cost after a transient blip. And that per-client rate limiter is **shared across operations**, so one throttle-prone API surface slows every call the client makes, including ones that were never in trouble (hence the provider aliases above). | ||
|
|
||
| The important nuance is that these costs only exist where requests were succeeding in the first place. For resources that are actually being throttled, "slower" is a non-issue because it wasn't going through anyway and cycling through `Rate exceeded` errors has no latency worth protecting. A **paced request that succeeds beats multiple quick ones that bounce**, so scope it to resources where throttling is expected, where you give up no real speed because standard retries were already getting throttled. |
There was a problem hiding this comment.
While the message is pretty straightforward, I still feel like a short summary is missing. Without it, it feels like we drop a reader in the middle of a conversation.
Maybe something like:
The practical rule is simple: keep standard mode by default, and use adaptive mode where throttling is expected and repeatable. A paced request that succeeds is better than a burst of fast requests that AWS rejects.
There was a problem hiding this comment.
Agreed. The ending was not succinct enough. I like yours. Let's update.
| The important nuance is that these costs only exist where requests were succeeding in the first place. For resources that are actually being throttled, "slower" is a non-issue because it wasn't going through anyway and cycling through `Rate exceeded` errors has no latency worth protecting. A **paced request that succeeds beats multiple quick ones that bounce**, so scope it to resources where throttling is expected, where you give up no real speed because standard retries were already getting throttled. | |
| We have a practical rule at Masterpoint that is simple: keep the standard mode by default, and use adaptive retry mode where throttling occurs or is expected (Route53, we're looking at you). A paced request that succeeds is better than a burst of fast requests that AWS rejects. |
There was a problem hiding this comment.
Route53, we're looking at you
Haha, I like it!
There was a problem hiding this comment.
@Gowiem I didn't fully remove the paragraph "The important nuance is that...", but I edited it to preserve the reasoning.
Co-authored-by: Matt Gowie <matt@masterpoint.io>
482436f to
a0dc5d1
Compare

https://deploy-preview-160--masterpoint.netlify.app/blog/aws-adaptive-retry-mode-terraform-throttled-api-requests/

Summary by CodeRabbit
Summary by CodeRabbit
max_retries, and-parallelismconsiderations for throttled API requests.