"SSO session associated with this profile is invalid" when querying Dynamo -- but using AWS_SESSION_TOKEN etc for credentials #4380
Unanswered
jcollum-nutrien
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
-
When I try to get an item from Dynamo I get an error:
CredentialsProviderError: The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.
The issue is that we aren't using aws cli to log in, we are using env vars that we grab from our SSO portal https://d-blah.awsapps.com/start#/ which gives
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
andAWS_SESSION_TOKEN
that are good for 4 hours. I have DEFINITELY pasted new values before attempting this. The database is definitely inus-east-2
env vars:
redacted = pulled that portion out on purpose
To verify that the env vars work I ran
aws dynamodb describe-table --table-name=foo
and got results back.My credentials file doesn't exist (this is expected):
Code that isn't accessing dynamo has been running fine.
Code:
Stack trace:
So why would a Dynamo command require (and fail)
resolveSSOCredentials
when I have env vars that give me access?Beta Was this translation helpful? Give feedback.
All reactions