An Elixir app to query authorization credentials via EC2 metadata. This is a built-in feature for at least some of Amazon's official SDKs. Intended to be used in conjunction with any AWS library.
client = AWSMetadata.get_client()
iex(1)> client = AWSMetadata.get_client()
%{
access_key_id: "ACCESS_KEY_ID",
endpoint: "amazonaws.com",
region: "us-east-1",
secret_access_key: "SECRET_ACCESS_KEY",
token: "TOKEN"
}
If available in Hex, the package can be installed
by adding ex_aws_metadata
to your list of dependencies in mix.exs
:
def deps do
[
{:ex_aws_metadata, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/ex_aws_metadata.