aiodynamo icon indicating copy to clipboard operation
aiodynamo copied to clipboard

`FileCredentials()` doesn't support credentials retrieved with AWS CLI v2

Open jonathanunderwood opened this issue 1 year ago • 1 comments

It appears that FileCredentials expects to see credentials at ~/.aws/credentials. However, with recent versions of the AWS CLI, this file isn't populated, for example, when authenticating via aws sso login. This behaviour change has been discussed at length here: https://github.com/aws/aws-cli/issues/4982. This article discusses more about why relying on .aws/credentials isn't the right approach.

Would it be possible to update FileCredentials to leverage credential_process?

jonathanunderwood avatar Jun 30 '24 09:06 jonathanunderwood

Two things:

You can tell FileCredentials where to look for the credentials file by passing it a path as its first argument.

credential process is unrelated to FileCredential. I would probably accept a PR that added a credentials loader that supports a credential process, but in the meantime, aiodynamo supports custom credential providers so you can write an implementation that works for you without relying on me merging a PR and releasing a new version.

ojii avatar Jul 01 '24 00:07 ojii