aws: Amazon Web Services (AWS) for Haskell

[ aws, bsd3, cloud, distributed-computing, library, network, web ] [ Propose Tags ]

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

[Skip to Readme]
Versions [RSS] [faq] 0.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.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.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.1, 0.18, 0.19, 0.20, 0.21, 0.21.1, 0.22
Change log
Dependencies aeson (>=0.6 && <1.6), attoparsec (>=0.11 && <0.14), aws, base (>=4.6 && <4.11), base16-bytestring (==0.1.*), base64-bytestring (==1.0.*), blaze-builder (>= && <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]
License BSD-3-Clause
Copyright See contributors list in README and LICENSE file
Author Aristid Breitkreuz, contributors see README
Revised Revision 2 made by sjakobi at 2021-10-11T12:07:49Z
Category Network, Web, AWS, Cloud, Distributed Computing
Home page
Source repo this: git clone 0.17)
head: git clone
Uploaded by AristidBreitkreuz at 2017-09-30T15:17:02Z
Distributions Arch:0.22, Debian:0.20, Fedora:0.22, FreeBSD:0.12.1, NixOS:0.22, openSUSE:0.22
Executables Sqs, DynamoDb, SimpleDb, PutBucketNearLine, NukeBucket, MultipartTransfer, MultipartUpload, GetObjectGoogle, GetObject
Downloads 71133 total (199 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2017-09-30 [all 1 reports]



Manual Flags

Automatic Flags

Build the examples.


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


Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for aws-0.17

[back to package description]


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.


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
$ 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

  • I get an error when I try to access my bucket with upper-case characters / a very long name.

    Those names are not compliant with DNS. You need to use path-style requests, by setting s3RequestStyle in the configuration to PathStyle. Note that such bucket names are only allowed in the US standard region, so your endpoint needs to be US standard.

Release Notes




Name Github E-Mail Company Components
Abhinav Gupta abhinav - IAM, SES
Aristid Breitkreuz aristidb - Co-Maintainer
Bas van Dijk basvandijk Erudify AG S3
David Vollbracht qxjit
Felipe Lessa meteficha currently secret Core, S3, SES
Nathan Howell NathanHowell Alpha Heavy Industries S3
Ozgun Ataman ozataman Soostone Inc Core, S3, DynamoDb
Steve Severance sseveran Alpha Heavy Industries S3, SQS
John Wiegley jwiegley FP Complete Co-Maintainer, S3
Chris Dornan cdornan Iris Connect Core
John Lenz wuzzeb DynamoDB, Core