hs3

Network.AWS.AWSConnection

Contents

- Constants
- Function Types
- Data Types

Description

Connection and authentication info for an Amazon AWS request.

Synopsis

- defaultAmazonS3Host :: String
- defaultAmazonS3Port :: Int
- amazonS3Connection :: String -> String -> AWSConnection
- amazonS3ConnectionFromEnv :: IO (Maybe AWSConnection)
- data AWSConnection = AWSConnection {
  - awsHost :: String
  - awsPort :: Int
  - awsAccessKey :: String
  - awsSecretKey :: String
  }

# Constants

defaultAmazonS3Host :: String

Hostname used for connecting to Amazon's production S3 service (`s3.amazonaws.com`).

defaultAmazonS3Port :: Int

Port number used for connecting to Amazon's production S3 service (`80`).

# Function Types

amazonS3Connection

Arguments

:: String | Access Key ID
-> String | Secret Access Key
-> AWSConnection | Connection to Amazon S3

Create an AWSConnection to Amazon from credentials. Uses the production service.

amazonS3ConnectionFromEnv :: IO (Maybe AWSConnection)

Retrieve Access and Secret keys from environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, respectively. Either variable being undefined or empty will result in `Nothing`.

# Data Types

data AWSConnection

An Amazon Web Services connection. Everything needed to connect and authenticate requests.

Constructors

AWSConnection |

Fields

awsHost :: String

  Service provider hostname

awsPort :: Int

  Service provider port number

awsAccessKey :: String

  Access Key ID

awsSecretKey :: String

  Secret Access Key

Instances

Show AWSConnection |