How can I get credentials from single sign-on token (SSO) #4163
-
Hi there, I would like to generate credentials using SSO in my Kotlin application. I ran the command val client = S3Client.builder()
.region(Region.US_EAST_1)
.credentialsProvider(ProfileCredentialsProvider.create('my_profile'))
.build() I'm unsure what to use for the credentials provider to make this work. When I try this now I get the error:
My config file looks like this:
I've read this guide and understand how this works, but I don't know what code I need. If anyone could paste in a quick example, that would be really helpful. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Answer: |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Answer:
Hello @flex-finch ,
Thank you very much for your submission.
You can find an example of config file setting for AWS IAM Identity Center (successor to AWS Single Sign-On) here as well as step by step configuration here.
Now for using SSO with the AWS JAVA SDK v2 there is documentation guidelines that goes over setting up single sign-on access for the SDK in the developer guide (see). For the use of profile there is an example outlined here : https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/credentials-profiles.html
Let me know if that helps out or if you need further documentation/support.
Best regards,
Yasmine