aws-sdk-java icon indicating copy to clipboard operation
aws-sdk-java copied to clipboard

Infinite loop: com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:118)

Open aballa-perforce opened this issue 1 year ago • 1 comments

Upcoming End-of-Support

  • [X] I acknowledge the upcoming end-of-support for AWS SDK for Java v1 was announced, and migration to AWS SDK for Java v2 is recommended.

Describe the bug

We are integrating connecting to RDS using IAM service accounts using assumedRoles across AWS accounts.

Attached complete log.

com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials is going in an infini aws.log te loop.

at com.amazonaws.auth.AWSCredentialsProviderChain.getCredentials(AWSCredentialsProviderChain.java:118) is getting called repeatedly from at com.amazonaws.http.AmazonHttpClient$RequestExecutor.getCredentialsFromContext(AmazonHttpClient.java:1269)

Below is the code from com.amazonaws.http.AmazonHttpClient$RequestExecutor.getCredentialsFromContext and credentialsProvider is getting set to AWSCredentialsProviderChain and that is the reason it is going into infinite loop.

image

Expected Behavior

It should be able to get credentials.

Current Behavior

Inifite loop.

Reproduction Steps

See description.

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

1.12.682

JDK version used

1.8

Operating System and version

Linux

aballa-perforce avatar Aug 22 '24 08:08 aballa-perforce

@aballa-perforce can you share a SSCEE code example that we can use to repro?

debora-ito avatar Aug 22 '24 16:08 debora-ito

It looks like this issue has not been active for more than five days. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it.

github-actions[bot] avatar Sep 01 '24 18:09 github-actions[bot]