Skip to content

use Adaptive mode retry to handle SSM throttling.#50

Merged
Divyanshu Tiwari (divyanshu-tiwari) merged 2 commits intomainfrom
retry-for-ssm
Mar 26, 2026
Merged

use Adaptive mode retry to handle SSM throttling.#50
Divyanshu Tiwari (divyanshu-tiwari) merged 2 commits intomainfrom
retry-for-ssm

Conversation

@divyanshu-tiwari
Copy link
Copy Markdown
Contributor

@divyanshu-tiwari Divyanshu Tiwari (divyanshu-tiwari) commented Mar 25, 2026

Description

Types of changes

This pull request updates the AWS SSM client configuration to improve reliability when fetching secrets by increasing the maximum retry attempts and switching to adaptive retry mode.

AWS SSM Client Configuration Improvements:

  • The ssm.NewFromConfig call in secret.go now uses the adaptive retry mode from the AWS SDK and increases the maximum retry attempts to 15, which should help with transient errors when retrieving parameters from SSM.
  • The import section in secret.go adds the github.com/aws/aws-sdk-go-v2/aws/retry package to support the new retry configuration.
  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • I have added tests to cover my changes.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds additional resilience to AWS SSM Parameter Store secret retrieval by retrying failed GetParameter calls with a small randomized delay.

Changes:

  • Added math/rand/v2 + time usage to introduce randomized backoff between attempts.
  • Wrapped svc.GetParameter in a 3-attempt retry loop.
  • Refactored variable initialization to support retry logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@divyanshu-tiwari Divyanshu Tiwari (divyanshu-tiwari) changed the title retry SSM:GetParameter after random delay to handle throttling use Adaptive mode retry to handle SSM throttling. Mar 25, 2026
Copy link
Copy Markdown
Contributor

@hladush Ivan Hladush (hladush) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
why do you not do it as parameters for pipeline?(Retry number)

@divyanshu-tiwari Divyanshu Tiwari (divyanshu-tiwari) merged commit 98cc8a5 into main Mar 26, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants