Skip to content
Discussion options

You must be logged in to vote

Hey @nwsparks, seems you're hitting a behavior change in how the underlying (.NET) SDK caches credentials in v5.

When PS Tools resolves credentials from ~/.aws/credentials, it reads the file once and snapshots the keys into an immutable credentials object that gets cached in $StoredAWSCredentials. The new credential resolution in v5 has a layer that watches for changes to environment variables (AWS_ACCESS_KEY_ID, AWS_PROFILE, etc.) but doesn't currently monitor the credentials file itself for changes. So when aws-adfs writes new creds to the file, the cached object has no idea.

The account switching issue is the same thing, stale cached credentials from the previous profile.

Quickest work…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by nwsparks
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants