MCPcopy Index your code
hub / github.com/aws/aws-cli / load_credentials

Method load_credentials

awscli/botocore/credentials.py:2225–2243  ·  view source on GitHub ↗

Goes through the credentials chain, returning the first ``Credentials`` that could be loaded.

(self)

Source from the content-addressed store, hash-verified

2223 raise UnknownCredentialError(name=name)
2224
2225 def load_credentials(self):
2226 """
2227 Goes through the credentials chain, returning the first ``Credentials``
2228 that could be loaded.
2229 """
2230 # First provider to return a non-None response wins.
2231 for provider in self.providers:
2232 logger.debug("Looking for credentials via: %s", provider.METHOD)
2233 creds = provider.load()
2234 if creds is not None:
2235 return creds
2236
2237 # If we got here, no credentials could be found.
2238 # This feels like it should be an exception, but historically, ``None``
2239 # is returned.
2240 #
2241 # +1
2242 # -js
2243 return None
2244
2245
2246class SSOCredentialFetcher(CachedCredentialFetcher):

Calls 1

loadMethod · 0.45