How to use named AWS CLI Profiles and SSO with the Go V2 SDK. #2229
Unanswered
jwechsler10
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I have been following the steps here on trying to use a named profile with SSO. I cannot seem to get it to work. Here is my code snippet that I am using:
It fails with the error:
operation error IAM: ListGroups, failed to sign request: failed to retrieve credentials: failed to refresh cached credentials, failed to read cached SSO token file, open ~/.aws/sso/cache/9ed037b84943c4caa3a520e48a5540181c46c98c.json: no such file or directory
I have always made sure to run
aws sso login
before running my script to make sure my credentials are valid.My aws config file is setup as follows, redacting the real start URL, role names and account numbers:
I have tried the following:
aws sso login
rm -rf ~/.aws/sso/cache
and then runningaws --profile sandbox sso login
I have verified that the
default
profile is working as expectedBeta Was this translation helpful? Give feedback.
All reactions