This will be another quick instalment of “AWS via Haskell”. Yesterday we flew through AWS’s Simple Queue Service. Today, we’ll look at SimpleDB.

Part 1: Prerequisites

Firstly, you’ll need access to SimpleDB. There are several options:

Create an AWS account and use the real SimpleDB service in the cloud: you can start with the free tier and go from there

Install simpledb-dev2 or similar

localstack does not, for reasons unknown to me, provide a SimpleDB implementation.

Part 2: aws-via-haskell.cabal : the dependencies

You’ll see that our sdb-app target depends on the following

amazonka-sdb

base

lens

text

We’ll also use some of the helper functions in our shared AWSInfo.hs module.

Part 3: Main.hs : the code

This program demonstrates how to:

Create a domain

List domains

Put attributes

Get attributes

Part 4: The full working demo project

I’ve gathered this all together into this buildable project. As always, I like to build using Stack.

Part 5: Related posts