File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
core/auth/src/main/java/software/amazon/awssdk/auth/credentials Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ private RefreshResult<AwsCredentials> refreshCredentials() {
176176 Instant expiration = credentials .getExpiration ().orElse (null );
177177 log .debug (() -> "Loaded credentials from IMDS with expiration time of " + expiration );
178178
179+ // Reset profile retry count after successful credential fetch
179180 profileRetryCount = 0 ;
180181
181182 return RefreshResult .builder (credentials .getAwsCredentials ())
@@ -194,7 +195,7 @@ private RefreshResult<AwsCredentials> refreshCredentials() {
194195
195196 profileRetryCount ++;
196197 if (profileRetryCount <= MAX_PROFILE_RETRIES ) {
197- log .debug (() -> "Retrying fetching the profile name again" );
198+ log .debug (() -> "Profile name not found, retrying fetching the profile name again. " );
198199 return refreshCredentials ();
199200 }
200201 throw SdkClientException .create (FAILED_TO_LOAD_CREDENTIALS_ERROR , e );
You can’t perform that action at this time.
0 commit comments