-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws sdk v2 2.17.216 - WebIdentityTokenFileCredentialsProvider() exception #4228
Comments
@lsatyapal can you provide a full stacktrace with the error? |
Below are the only traces that i can see, Error creating bean with name 'io.XXX.com.aws.autoconfigure.dynamodb.AwsDynamoDbV2AutoConfiguration': Unsatisfied dependency expressed through constructor parameter 3: Error creating bean with name 'awsCredentialsProviderV2' defined in class path resource [io/XXX/com/aws/autoconfigure/XXX$AwsSdkV2Configuration.class]: Failed to instantiate [software.amazon.awssdk.auth.credentials.AwsCredentialsProvider]: Factory method 'awsCredentialsProviderV2' threw exception with message: PROFILE_FILE_SUPPLIER","thread_name":"main","@timestamp":"2023-07-25T09:38:16.056+0000","level":"WARN","logger_name":"org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext","trace_id":"","span_id":"","trace_sampled":""} Note: some the specific names are masked with xxx. |
I'm sorry, but the one line of error doesn't help much. My guess is that some classes are missing from the classpath, maybe there are still some dependencies from Spring 2.7.1 being used after you upgraded to Spring 3.1.0. You can search on Spring communities if other developers had the same issue. If you find more stacktraces with Java SDK classes in the path we can take a look. |
Hi, Thank you for the response !! We would like to know any dependency of aws sdk based on the spring version? |
There's no restrictions on the Java SDK version used with Spring. If you are using an integration library, like Spring Cloud, those will have a dependency on the Java SDK that may conflict with the Java SDK modules you are using directly in your project. In this case, you'll need to resolve those version conflicts. This is a question about "how dependency works", and it's not specific to the AWS SDK for Java, so it's out of scope of this support channel. You can search for articles on how to resolve maven dependency issues on the web. |
|
Describe the bug
Hi,
We are using WebIdentityTokenFileCredentialsProvider() to authenticate to aws dynamodb and it is working fine with the below versions,
aws sdk v2 - 2.17.216
spring - 2.7.1
But the same code with aws sdk v2 - 2.17.216, spring - 3.1.0 throwing a below exception,
[software.amazon.awssdk.auth.credentials.AwsCredentialsProvider]: Factory method 'awsCredentialsProviderV2' threw exception with message: PROFILE_FILE_SUPPLIER","thread_name":"main","@timestamp":"2023-07-24T16:05:57.208+0000","level":"WARN","logger_name":"org.springframework.boot.web.reactive.context.AnnotationConfigReactiveWebServerApplicationContext","trace_id":"","span_id":"","trace_sampled":""}
In both the cases IAM role(dynamodb full permissions) is attached a EKS service account and the same service account is attached to a pod.
We have included the following dependencies in the pom.xml
software.amazon.awssdk
dynamodb
2.17.216
true
software.amazon.awssdk
sts
2.17.216
software.amazon.awssdk
sdk-core
2.17.216
com.amazonaws
aws-java-sdk-sts
1.12.421
Expected Behavior
i should not throw any exception and get the accesskey, secrekey and session token for aws resource authentication.
Current Behavior
exception is occured with WebIdentityTokenFileCredentialsProvider() authentication method
Reproduction Steps
na
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
2.17.216
JDK version used
17,0.8
Operating System and version
linux, 5.10.184-175.731.amzn2.x86_64
The text was updated successfully, but these errors were encountered: