Closed MathiasVE closed 1 week ago
The problem has been resolved. I had to specify an anonymous credentials provider. Maybe I missed some documentation but this is not easy to find out from the api itself.
.credentialsProvider(AnonymousCredentialsProvider.create())
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.
Describe the bug
Performing stsClient.assumeRoleWithWebIdentity results in software.amazon.awssdk.core.exception.SdkClientException: Unable to load credentials from any of the providers in the chain.
Expected Behavior
I would expect to get the valid credentials. I tested with the same input parameters as the aws cli within the same GKE cluster environment and service account where I successfully receive the temporary credentials.
output:
Current Behavior
Reproduction Steps
Beneath is the code that is being used
I am following the example code below: https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/sts/src/main/java/com/example/sts/AssumeRole.java
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
2.26.1
JDK version used
openjdk 17.0.11 2024-04-16 LTS
Operating System and version
bellsoft/liberica-runtime-container:jdk-17-glibc