MCPcopy Create free account
hub / github.com/aws/aws-cli / fetch_creds

Method fetch_creds

awscli/botocore/credentials.py:2119–2138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2117
2118 def _create_fetcher(self, full_uri, headers):
2119 def fetch_creds():
2120 try:
2121 response = self._fetcher.retrieve_full_uri(
2122 full_uri, headers=headers
2123 )
2124 register_feature_id('CREDENTIALS_HTTP')
2125 except MetadataRetrievalError as e:
2126 logger.debug(
2127 "Error retrieving container metadata: %s", e, exc_info=True
2128 )
2129 raise CredentialRetrievalError(
2130 provider=self.METHOD, error_msg=str(e)
2131 )
2132 return {
2133 'access_key': response['AccessKeyId'],
2134 'secret_key': response['SecretAccessKey'],
2135 'token': response['Token'],
2136 'expiry_time': response['Expiration'],
2137 'account_id': response.get('AccountId'),
2138 }
2139
2140 return fetch_creds
2141

Callers

nothing calls this directly

Calls 3

register_feature_idFunction · 0.90
retrieve_full_uriMethod · 0.80

Tested by

no test coverage detected