aws: Amazon Web Services (AWS) for Haskell
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]
Modules
[Index] [Quick Jump]
- Aws
- Aws.Aws
- Aws.Core
- Aws.DynamoDb
- Ec2
- Aws.Iam
- Aws.Iam.Commands
- Aws.Iam.Commands.AddUserToGroup
- Aws.Iam.Commands.CreateAccessKey
- Aws.Iam.Commands.CreateGroup
- Aws.Iam.Commands.CreateUser
- Aws.Iam.Commands.DeleteAccessKey
- Aws.Iam.Commands.DeleteGroup
- Aws.Iam.Commands.DeleteGroupPolicy
- Aws.Iam.Commands.DeleteUser
- Aws.Iam.Commands.DeleteUserPolicy
- Aws.Iam.Commands.GetGroupPolicy
- Aws.Iam.Commands.GetUser
- Aws.Iam.Commands.GetUserPolicy
- Aws.Iam.Commands.ListAccessKeys
- Aws.Iam.Commands.ListGroupPolicies
- Aws.Iam.Commands.ListGroups
- Aws.Iam.Commands.ListMfaDevices
- Aws.Iam.Commands.ListUserPolicies
- Aws.Iam.Commands.ListUsers
- Aws.Iam.Commands.PutGroupPolicy
- Aws.Iam.Commands.PutUserPolicy
- Aws.Iam.Commands.RemoveUserFromGroup
- Aws.Iam.Commands.UpdateAccessKey
- Aws.Iam.Commands.UpdateGroup
- Aws.Iam.Commands.UpdateUser
- Aws.Iam.Core
- Aws.Iam.Internal
- Aws.Iam.Commands
- Aws.Network
- Aws.S3
- Aws.S3.Commands
- Aws.S3.Commands.CopyObject
- Aws.S3.Commands.DeleteBucket
- Aws.S3.Commands.DeleteObject
- Aws.S3.Commands.DeleteObjectVersion
- Aws.S3.Commands.DeleteObjects
- Aws.S3.Commands.GetBucket
- Aws.S3.Commands.GetBucketLocation
- Aws.S3.Commands.GetBucketObjectVersions
- Aws.S3.Commands.GetBucketVersioning
- Aws.S3.Commands.GetObject
- Aws.S3.Commands.GetService
- Aws.S3.Commands.HeadObject
- Aws.S3.Commands.Multipart
- Aws.S3.Commands.PutBucket
- Aws.S3.Commands.PutBucketVersioning
- Aws.S3.Commands.PutObject
- Aws.S3.Commands.RestoreObject
- Aws.S3.Core
- Aws.S3.Commands
- Aws.Ses
- Aws.Ses.Commands
- Aws.Ses.Commands.DeleteIdentity
- Aws.Ses.Commands.GetIdentityDkimAttributes
- Aws.Ses.Commands.GetIdentityNotificationAttributes
- Aws.Ses.Commands.GetIdentityVerificationAttributes
- Aws.Ses.Commands.ListIdentities
- Aws.Ses.Commands.SendRawEmail
- Aws.Ses.Commands.SetIdentityDkimEnabled
- Aws.Ses.Commands.SetIdentityFeedbackForwardingEnabled
- Aws.Ses.Commands.SetIdentityNotificationTopic
- Aws.Ses.Commands.VerifyDomainDkim
- Aws.Ses.Commands.VerifyDomainIdentity
- Aws.Ses.Commands.VerifyEmailIdentity
- Aws.Ses.Core
- Aws.Ses.Commands
- Aws.SimpleDb
- Aws.Sqs
Flags
Automatic Flags
| Name | Description | Default |
|---|---|---|
| examples | Build the examples. | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- aws-0.25.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 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.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.1, 0.18, 0.19, 0.20, 0.21, 0.21.1, 0.22, 0.22.1, 0.23, 0.24, 0.24.1, 0.24.2, 0.24.3, 0.24.4, 0.25, 0.25.1, 0.25.2 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | aeson (>=2.2.0.0), attoparsec (>=0.11 && <0.15), attoparsec-aeson (>=2.1.0.0), aws , base (>=4.9 && <5), base16-bytestring (>=0.1 && <1.1), base64-bytestring (>=1.0 && <1.3), blaze-builder (>=0.2.1.4 && <0.5), byteable (>=0.1 && <0.2), bytestring (>=0.9 && <0.13), case-insensitive (>=0.2 && <1.3), cereal (>=0.3 && <0.6), conduit (>=1.3 && <1.4), conduit-extra (>=1.3 && <1.4), containers (>=0.4), crypton (>=0.34), data-default (>=0.5.3 && <0.9), directory (>=1.0 && <2.0), errors (>=2.0), exceptions (>=0.8 && <0.11), filepath (>=1.1 && <1.6), http-client-tls (>=0.3 && <0.4), http-conduit (>=2.3 && <2.4), http-types (>=0.7 && <1.0), lifted-base (>=0.1 && <0.3), memory , monad-control (>=0.3), mtl (>=2 && <3), network (>=3 && <4), network-bsd (>=2.8 && <2.9), old-locale (>=1 && <2), resourcet (>=1.2 && <1.4), safe (>=0.3 && <0.4), scientific (>=0.3), tagged (>=0.7 && <0.9), text (>=0.11), time (>=1.4.0 && <2.0), transformers (>=0.2.2 && <0.7), unordered-containers (>=0.2), utf8-string (>=0.3 && <1.1), vector (>=0.10), xml-conduit (>=1.8 && <2.0) [details] |
| License | BSD-3-Clause |
| Copyright | See contributors list in README and LICENSE file |
| Author | Aristid Breitkreuz, contributors see README |
| Maintainer | aristidb@gmail.com |
| Uploaded | by JoeyHess at 2025年12月08日T20:44:48Z |
| Category | Network, Web, AWS, Cloud, Distributed Computing |
| Home page | http://github.com/aristidb/aws |
| Source repo | this: git clone https://github.com/aristidb/aws.git(tag 0.25.2) head: git clone https://github.com/aristidb/aws.git |
| Distributions | Arch:0.24.2, Debian:0.22, Fedora:0.24.4, FreeBSD:0.12.1, LTSHaskell:0.24.4, NixOS:0.24.4, Stackage:0.25.2, openSUSE:0.24.4 |
| Reverse Dependencies | 21 direct, 0 indirect [details] |
| Executables | Sqs, DynamoDb, SimpleDb, PutBucketNearLine, NukeBucket, MultipartTransfer, MultipartUpload, GetObjectGoogle, GetObject, GetObjectV4 |
| Downloads | 80578 total (256 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2025年12月09日 [all 1 reports] |
Readme for aws-0.25.2
[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 Control.Monad.Trans.Resource
import Data.Conduit ((.|), runConduit)
import Data.Conduit.Binary (sinkFile)
import Network.HTTP.Conduit (newManager, tlsManagerSettings, 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. -}
mgr <- newManager tlsManagerSettings
runResourceT $ 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. -}
runConduit $ 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
s3RequestStylein the configuration toPathStyle. Note that such bucket names are only allowed in the US standard region, so your endpoint needs to be US standard.
Release Notes
See CHANGELOG
Resources
- aws on Github
- aws on Hackage (includes reference documentation)
- Official Amazon Web Services website
Contributors
| Name | Github | 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 | S3 |
| Chris Dornan | cdornan | chris.dornan@irisconnect.co.uk | Iris Connect | Core |
| John Lenz | wuzzeb | DynamoDB, Core | ||
| Joey Hess | joeyh | id@joeyh.name | - | Co-Maintainer, S3 |