Skip to content

Commit

Permalink
invert order of method discovery in credential chain
Browse files Browse the repository at this point in the history
  • Loading branch information
Matteo Ricci committed Jan 16, 2025
1 parent e9b076e commit 31e11fe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/amazonka/src/Amazonka/Auth.hs
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,14 @@ discover ::
m Env
discover =
runCredentialChain
[ fromKeysEnv,
fromFileEnv,
fromWebIdentityEnv,
fromContainerEnv,
\env -> do
[ \env -> do
onEC2 <- isEC2 $ manager env
unless onEC2 $ throwM CredentialChainExhausted
fromDefaultInstanceProfile env
fromDefaultInstanceProfile env,
fromWebIdentityEnv,
fromContainerEnv,
fromFileEnv,
fromKeysEnv
]

-- | Compose a list of credential-providing functions by testing each
Expand Down

0 comments on commit 31e11fe

Please sign in to comment.