From d325fa8c19216629e821941b6a72071c02cb5cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Libor=20Ry=C5=A1av=C3=BD?= Date: Fri, 7 Nov 2025 09:26:12 +0100 Subject: [PATCH] doc: Improve ExpiryWindowJitterFrac explanation Clarify doc regarding ExpiryWindowJitterFrac and its effect on credential expiration timing. --- aws/credential_cache.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aws/credential_cache.go b/aws/credential_cache.go index 623890e8d80..65de5b5a2b9 100644 --- a/aws/credential_cache.go +++ b/aws/credential_cache.go @@ -27,10 +27,14 @@ type CredentialsCacheOptions struct { // ExpiryWindowJitterFrac provides a mechanism for randomizing the // expiration of credentials within the configured ExpiryWindow by a random - // percentage. Valid values are between 0.0 and 1.0. + // percentage, helping distribute credential refresh operations over time. + // Valid values are between 0.0 and 1.0. + // + // The effective early-expiry window is randomly selected between: + // (1 - ExpiryWindowJitterFrac) * ExpiryWindow and ExpiryWindow // // As an example if ExpiryWindow is 60 seconds and ExpiryWindowJitterFrac - // is 0.5 then credentials will be set to expire between 30 to 60 seconds + // is 0.3 then credentials will be set to expire between 42 and 60 seconds // prior to their actual expiration time. // // If ExpiryWindow is 0 or less then ExpiryWindowJitterFrac is ignored.