The aws-sns package

[Tags:library, mit, test]

Bindings for AWS SNS

API Version: 2013-03-31

http://docs.aws.amazon.com/sns/2010-03-31/APIReference/Welcome.html


[Skip to Readme]

Properties

Versions 0.1
Change log CHANGELOG.md
Dependencies aeson (>=0.7), aws (>=0.9), aws-general (>=0.1), base (==4.*), blaze-builder (>=0.3), bytestring (>=0.10), conduit (>=1.1), containers (>=0.5), http-conduit (>=2.1), http-types (>=0.8), parsers (>=0.11), QuickCheck (>=2.7), resourcet (>=1.1), text (>=1.1), time (>=1.4), transformers (>=0.3), xml-conduit (>=1.2) [details]
License MIT
Copyright Copyright (c) 2014 AlephCloud, Inc.
Author Lars Kuhtz <lars@alephcloud.com>
Maintainer Lars Kuhtz <lars@alephcloud.com>
Category Network, Web, AWS, Cloud, Distributed Computing
Home page https://github.com/alephcloud/hs-aws-sns
Bug tracker https://github.com/alephcloud/hs-aws-sns/issues
Source repository head: git clone https://github.com/alephcloud/hs-aws-sns.git
this: git clone https://github.com/alephcloud/hs-aws-sns.git(tag 0.1)
Uploaded Tue Aug 5 01:12:37 UTC 2014 by larsk
Distributions NixOS:0.1
Downloads 313 total (5 in the last 30 days)
Votes
0 []
Status Docs available [build log]
Successful builds reported [all 2 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for aws-sns

Readme for aws-sns-0.1

Build Status

Haskell Bindings for AWS SNS

API Version 2013-03-31

Amazon AWS SNS API Reference

This package depends on the aws-general package and the aws package. From the latter the it borrows the machinery for managing AWS credentials and making requests. There is also some documentation, including an usage example, in the README of the aws package

Installation

Assuming that the Haskell compiler GHC and the Haskell build tool cabal is already installed run the following command from the shell:

cabal install --enable-tests

Running Tests

There are few test cases included in the package. These tests require an AWS account and AWS credentials stored in the file ~/.aws-keys in the format described in the documentation of the aws package.

When running these tests some (low) costs may incur for usage of the AWS services. Therefor the user must explicitly consent to the usage of the AWS credentials by passing the commandline options --run-with-aws-credentials to the test application. In addition the tests require an email address that must be provided with the command line option --test-email.

cabal test --test-option=--run-with-aws-credentials --test-option=--test-email=<email-address>

where email address must be replaced with an actual email address.

Example Usage

Here is a very simple example for making a single request to AWS SNS. For more ellaborate usage refer to the documentation of the AWS package.

import Aws
import Aws.Core
import Aws.General
import Aws.Sns
import Data.IORef

cfg <- Aws.baseConfiguration
creds <- Credentials "access-key-id" "secret-access-key" `fmap` newIORef []
let snsCfg = SnsConfiguration HTTPS UsWest2
simpleAws cfg snsCfg $ ListTopics Nothing

In order to run the example you must replace "access-key-id" and "secret-access-key" with the respective values for your AWS account.

You may also take a look at the test examples in tests/Main.hs.