amazonka-2.0: Comprehensive Amazon Web Services SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityprovisional
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Auth.Keys

Description

Authentication via directly-provided access keys, including optional session token and environment variable lookup.

Synopsis

Documentation

fromKeys :: AccessKey -> SecretKey -> Env' withAuth -> Env Source #

Explicit access and secret keys.

fromSession :: AccessKey -> SecretKey -> SessionToken -> Env' withAuth -> Env Source #

Temporary credentials from a STS session consisting of the access key, secret key, and session token.

See: fromTemporarySession

fromTemporarySession :: AccessKey -> SecretKey -> SessionToken -> UTCTime -> Env' withAuth -> Env Source #

Temporary credentials from a STS session consisting of the access key, secret key, session token, and expiration time.

See: fromSession

fromKeysEnv :: MonadIO m => Env' withAuth -> m Env Source #

Retrieve access key, secret key and a session token from environment variables. We copy the behaviour of the SDKs and respect the following variables:

  • AWS_ACCESS_KEY_ID (and its alternate name, AWS_ACCESS_KEY)
  • AWS_SECRET_ACCESS_KEY (and its alternate name, AWS_SECRET_KEY)
  • AWS_SESSION_TOKEN (if present)

Throws MissingEnvError if a required environment variable is empty or unset.