amazonka-core-0.0.0: Core functionality, serialisation primitives, and data types for the amazonka Amazon Web Services SDKs.

Safe HaskellNone
LanguageHaskell2010

Network.AWS.Auth

Contents

Description

Explicitly specify, or automatically retrieve your Amazon AWS security credentials from the underlying host.

Synopsis

Defaults

accessKey Source

Arguments

:: Text

AWS_ACCESS_KEY

Default access key environment variable.

secretKey Source

Arguments

:: Text

AWS_SECRET_KEY

Default secret key environment variable.

Specifying credentials

fromKeys :: AccessKey -> SecretKey -> Auth Source

Explicit access and secret keys.

fromSession :: AccessKey -> SecretKey -> SecurityToken -> Auth Source

A session containing the access key, secret key, and a security token.

Retrieving credentials

data Credentials Source

Determines how authentication information is retrieved.

Constructors

FromKeys AccessKey SecretKey

Explicit access and secret keys. Note: you can achieve the same result purely by using fromKeys.

FromSession AccessKey SecretKey SecurityToken

A session containing the access key, secret key, and a security token. Note: you can achieve the same result purely by using fromSession.

FromProfile Text

An IAM Profile name to lookup from the local EC2 instance-data.

FromEnv Text Text

Environment variables to lookup for the access and secret keys.

Discover

Attempt to read the default access and secret keys from the environment, falling back to the first available IAM profile if they are not set.

Note: This attempts to resolve http://instance-data rather than directly retrieving http://169.254.169.254 for IAM profile information to ensure the dns lookup terminates promptly if not running on EC2.

getAuth :: (Functor m, MonadIO m) => Manager -> Credentials -> ExceptT String m Auth Source

Retrieve authentication information from the environment or instance-data.