Struggling to get SSO working with v2 of the Go SDK #2093
Unanswered
robwilkerson
asked this question in
Q&A
Replies: 2 comments 1 reply
-
Here is how to use sso credentials with this sdk: import "github.com/aws/aws-sdk-go-v2/config"
// ...
cfg, err := config.LoadDefaultConfig(
context.Background(),
config.WithSharedConfigProfile("dev-profile"),
)
if err != nil {
return err
} This is basically what you already have, so I would make sure that you have authenticated correctly. You can find the full detailed explanation here. Please let us know if you have any more questions about how to do this. |
Beta Was this translation helpful? Give feedback.
1 reply
-
FWIW a single retry seems to solve this problem, example code:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've authenticated using
aws sso login --profile my-profile
. I've also verified that I can runaws sts get-caller-identity
. All good. Now I want to run a small go command line utility that does the same thing, but I'm getting invalid token errors. I'm following the code samples I've seen, but still getting errors.I'd really appreciate any help I can get. The suggestions I've seen thus far might have a v1 focus because they reference functions that don't exist in modules or don't seem to align with the documentation I've read.
Beta Was this translation helpful? Give feedback.
All reactions