The aws package

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

Warnings:

Bindings for Amazon Web Services (AWS), with the aim of supporting all AWS services. To see a high level overview of the library, see the README at https://github.com/aristidb/aws/blob/master/README.md.


[Skip to ReadMe]

Properties

Versions0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.1, 0.2, 0.3, 0.3.1, 0.3.2, 0.4.0, 0.4.0.1, 0.4.1, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.4, 0.7.5, 0.7.6, 0.7.6.1, 0.7.6.2, 0.7.6.3, 0.7.6.4, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.9, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.10, 0.10.1, 0.10.2, 0.10.3, 0.10.4, 0.10.5, 0.11, 0.11.1, 0.11.2, 0.11.3, 0.11.4, 0.12, 0.12.1, 0.13.0, 0.13.1, 0.13.2, 0.14.0, 0.14.1, 0.15, 0.15.1, 0.16, 0.17, 0.17, 0.17.1
Change logCHANGELOG.md
Dependenciesaeson (>=0.6), attoparsec (>=0.11 && <0.14), aws, base (>=4.6 && <5), base16-bytestring (==0.1.*), base64-bytestring (==1.0.*), blaze-builder (>=0.2.1.4 && <0.5), byteable (==0.1.*), bytestring (>=0.9 && <0.11), case-insensitive (>=0.2 && <1.3), cereal (>=0.3 && <0.6), conduit (>=1.1 && <1.3), conduit-extra (==1.1.*), containers (>=0.4), cryptohash (==0.11.*), data-default (>=0.5.3 && <0.8), directory (>=1.0 && <2.0), errors (>=2.0), exceptions, filepath (>=1.1 && <1.5), ghc-prim, http-conduit (>=2.1 && <2.3), http-types (>=0.7 && <0.10), lifted-base (>=0.1 && <0.3), monad-control (>=0.3), mtl (==2.*), network (==2.*), old-locale (==1.*), resourcet (==1.1.*), safe (==0.3.*), scientific (>=0.3), tagged (>=0.7 && <0.9), text (>=0.11), time (>=1.4.0 && <2.0), transformers (>=0.2.2 && <0.6), unordered-containers (>=0.2), utf8-string (>=0.3 && <1.1), vector (>=0.10), xml-conduit (>=1.2 && <2.0) [details]
LicenseBSD3
CopyrightSee contributors list in README and LICENSE file
AuthorAristid Breitkreuz, contributors see README
Maintaineraristidb@gmail.com
CategoryNetwork, Web, AWS, Cloud, Distributed Computing
Home pagehttp://github.com/aristidb/aws
Source repositorythis: git clone https://github.com/aristidb/aws.git(tag 0.17)
head: git clone https://github.com/aristidb/aws.git
ExecutablesSqs, DynamoDb, SimpleDb, PutBucketNearLine, NukeBucket, MultipartTransfer, MultipartUpload, GetObjectGoogle, GetObject
UploadedSat Sep 30 15:16:28 UTC 2017 by AristidBreitkreuz

Modules

[Index]

Flags

NameDescriptionDefaultType
examples

Build the examples.

DisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for aws-0.17

[back to package description]

Introduction

The aws package attempts to provide support for using Amazon Web Services like S3 (storage), SQS (queuing) and others to Haskell programmers. The ultimate goal is to support all Amazon Web Services.

Installation

Make sure you have a recent GHC installed, as well as cabal-install, and installation should be as easy as:

$ cabal install aws

If you prefer to install from source yourself, you should first get a clone of the aws repository, and install it from inside the source directory:

$ git clone https://github.com/aristidb/aws.git
$ cd aws
$ cabal install

Using aws

Concepts and organisation

The aws package is organised into the general Aws module namespace, and subnamespaces like Aws.S3 for each Amazon Web Service. Under each service namespace in turn, there are general support modules and and Aws.<Service>.Commands.<Command> module for each command. For easier usage, there are the "bundling" modules Aws (general support), and Aws.<Service>.

The primary concept in aws is the Transaction, which corresponds to a single HTTP request to the Amazon Web Services. A transaction consists of a request and a response, which are associated together via the Transaction typeclass. Requests and responses are simple Haskell records, but for some requests there are convenience functions to fill in default values for many parameters.

Example usage

To be able to access AWS resources, you should put your into a configuration file. (You don't have to store it in a file, but that's how we do it in this example.) Save the following in $HOME/.aws-keys.

default AccessKeyID SecretKey

You do have to replace AccessKeyID and SecretKey with the Access Key ID and the Secret Key respectively, of course.

Then, copy this example into a Haskell file, and run it with runghc (after installing aws):

{-# LANGUAGE OverloadedStrings #-}

import qualified Aws
import qualified Aws.S3 as S3
import           Data.Conduit (($$+-))
import           Data.Conduit.Binary (sinkFile)
import           Network.HTTP.Conduit (withManager, responseBody)

main :: IO ()
main = do
  {- Set up AWS credentials and the default configuration. -}
  cfg <- Aws.baseConfiguration
  let s3cfg = Aws.defServiceConfig :: S3.S3Configuration Aws.NormalQuery

  {- Set up a ResourceT region with an available HTTP manager. -}
  withManager $ \mgr -> do
    {- Create a request object with S3.getObject and run the request with pureAws. -}
    S3.GetObjectResponse { S3.gorResponse = rsp } <-
      Aws.pureAws cfg s3cfg mgr $
        S3.getObject "haskell-aws" "cloud-remote.pdf"

    {- Save the response to a file. -}
    responseBody rsp $$+- sinkFile "cloud-remote.pdf"

You can also find this example in the source distribution in the Examples/ folder.

Frequently Asked Questions

S3 questions

Release Notes

See CHANGELOG

Resources

Contributors

Name |Github |E-Mail |Company |Components --------------------|-------------------------------------------------|--------------------------------|-----------------------------------------------------|-------------------- Abhinav Gupta |abhinav |mail@abhinavg.net |- |IAM, SES Aristid Breitkreuz |aristidb |aristidb@gmail.com |- |Co-Maintainer Bas van Dijk |basvandijk |v.dijk.bas@gmail.com |Erudify AG |S3 David Vollbracht |qxjit | | | Felipe Lessa |meteficha |felipe.lessa@gmail.com |currently secret |Core, S3, SES Nathan Howell |NathanHowell |nhowell@alphaheavy.com |Alpha Heavy Industries |S3 Ozgun Ataman |ozataman |ozgun.ataman@soostone.com |Soostone Inc |Core, S3, DynamoDb Steve Severance |sseveran |sseverance@alphaheavy.com |Alpha Heavy Industries |S3, SQS John Wiegley |jwiegley |johnw@fpcomplete.com |FP Complete |Co-Maintainer, S3 Chris Dornan |cdornan |chris.dornan@irisconnect.co.uk |Iris Connect |Core John Lenz |wuzzeb | | |DynamoDB, Core