Skip to content

Commit

Permalink
check for AWS_SHARED_CREDENTIALS_FILE
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed May 9, 2022
1 parent c866134 commit c9c4410
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## DEV

* consider `cognitect.anomalies/interrupted` from the http-client retriable
* check `AWS_SHARED_CREDENTIALS_FILE` as well as `AWS_CREDENTIAL_PROFILES_FILE`

## 0.8.536 / 2021-12-08

Expand Down
3 changes: 2 additions & 1 deletion src/cognitect/aws/credentials.clj
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@
(u/getProperty "aws.profile")
"default")))
([profile-name]
(profile-credentials-provider profile-name (or (io/file (u/getenv "AWS_CREDENTIAL_PROFILES_FILE"))
(profile-credentials-provider profile-name (or (some-> (u/getenv "AWS_SHARED_CREDENTIALS_FILE") io/file) ;; aws-cli and java sdk v2
(some-> (u/getenv "AWS_CREDENTIAL_PROFILES_FILE") io/file) ;; java sdk v1
(io/file (u/getProperty "user.home") ".aws" "credentials"))))
([profile-name ^File f]
(cached-credentials-with-auto-refresh
Expand Down

0 comments on commit c9c4410

Please sign in to comment.