canceraiddev / elm-aws-core / AWS.Credentials

A set of AWS credentials consists of an acces key id, a secret access key and an optional session token.

Note that credentials are sensitive and should not be bundled with web applications; it is a simple matter to extract them if they are. If your Elm code is running inside a Lambda function, this may not be a concern. If you Elm code is running in a browser it is definitely a security concern. If you are looking for a way to obtain credentials through user sign in against AWS Congito, this authentication package will do that:

https://package.elm-lang.org/packages/the-sett/elm-auth-aws/latest/


type alias Credentials =
{ accessKeyId : String
, secretAccessKey : String
, sessionToken : Maybe String 
}

Holds AWS credentials.


type alias AccessKeyId =
String

The AWS access key ID.


type alias SecretAccessKey =
String

The AWS secret access key.

fromAccessKeys : AccessKeyId -> SecretAccessKey -> Credentials

Create AWS credentials given an access key and secret key.

withSessionToken : String -> Credentials -> Credentials

Sets the session token.