aws-kinesis

Bindings for Amazon Kinesis https://github.com/alephcloud/hs-aws-kinesis

Latest on Hackage:0.1.5

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

Apache-2.0 licensed and maintained by Lars Kuhtz

Build Status

Haskell Bindings for Amazon Kinesis

API Version 2013-12-02

Amazon Kinesis 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.

cabal test --test-option=--run-with-aws-credentials

Example Usage

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

import Aws
import Aws.Core
import Aws.General
import Aws.Kinesis
import Data.IORef

cfg <- Aws.baseConfiguration
creds <- Credentials "access-key-id" "secret-access-key" `fmap` newIORef []
let kinesisCfg = KinesisConfiguration UsWest2
simpleAws cfg kinesisCfg $ ListStreams Nothing 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.

Changes

0.1.5

  • Provide NFData instances for all suitable types.

0.1.4

  • Solve issue #15, adding support for custom endpoints.

  • Add support for specifying a protocol to KinesisConfiguration.

  • Raise lower bound on aws-general to 0.2.1.

0.1.3

  • Fix bug #9; accept both Message and message in JSON error responses from AWS.

  • Solve issue #11; export PutRecords from Aws.Kinesis

  • Raise lower bound on aws-general to 0.2.

0.1.2

  • Add support PutRecords action.

  • Fix a bug in the GetShardIterator action's ToJSON instance which prevented starting an iterator at a sequence number.

0.1.1

  • Add IteratedTransaction and ListResponse instances for DescribeStream, GetRecords, and ListStreams.

  • Fix recognition of test failures.

0.1

First public version.

comments powered byDisqus