View Source API Reference aws_credentials v0.3.3
Modules
get_credentials/0
which should return Credentials :: map()
or undefined
. If undefined, it will attempt to get credentials again after 5 seconds delay. AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_SESSION_TOKEN
AWS_SECURITY_TOKEN
AWS_DEFAULT_REGION
AWS_REGION
At a minimum, the access key and secret keys must be defined.
This provider reads the credentials and config files for the Amazon CLI tools. This format is documented here but an example might look like
This implements an http client using the Erlang built in http client. If desired, this could be abstracted to support arbitrary http clients that return {ok, Status :: non_neg_integer(), Body :: binary(), Headers :: map()}
or {error, Reasons :: [term()]}
.
This is the behaviour definition for a credential provider module and it iterates over a list of providers. You may set the credential_providers` Erlang environment variable if you want to restrict checking only a certain subset of the default list or if you want to use your own custom providers. Default order of checking for credentials is: <ol> <li>Erlang application environment</li> <li>OS environment</li> <li>Credentials from AWS file</li> <li>ECS Task credentials</li> <li>EC2 credentials</li> </ol> Providers are expected to implement a function called `fetch/1
which takes as its argument a proplist of options which may influence the operation of the provider. The fetch/1 function should return either {ok, Credentials, Expiration}
or {error, Reason}
.