amazonka-0.0.6: Comprehensive Amazon Web Services SDK

Safe HaskellNone
LanguageHaskell2010

Network.AWS.Auth

Contents

Description

Explicitly specify your Amazon AWS security credentials, or retrieve them from the underlying OS.

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 using fromKeys without having to use the impure getAuth.

FromSession AccessKey SecretKey SecurityToken

A session containing the access key, secret key, and a security token. Note: you can achieve the same result purely using fromSession without having to use the impure getAuth.

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 using the specified Credentials style.