Datomic on AWS/DynamoDB – Installation Notes

I recently needed to get Datomic installed on Amazon AWS for a client, with the transactor set up to use Amazon’s DynamoDB as its storage service. The docs on the Datomic site were helpful, but left some things a little unclear.

First, realize that the command you use to initialize the storage for Datomic in DynamoDB

bin/datomic ensure-transactor <my-config-file> <my-config-file-modified>

is different from the command you use to start your transactor for normal use after setup. (Previously, I had only used Datomic with the built-in file storage – which actually uses the Java-based H2 database – and with Infinispan hosted in the Immutant app server, and neither of these storages require a separate configuration process to be run, so this was new to me.) NOTE: You can use the same filename for both the 3rd and 4th arguments to the command above, and the file will be modified in place by Datomic.

The ‘ensure-transactor’ step does all the work of configuring needed IAM Roles in your account, and of creating the Dynamo table for you. While the Datomic docs talk about using IAM Roles for authentication a privilege management as the preferred option, it is not clearly stated that this configuration step still requires that the EC2 instance’s environment have two variables defined: AWS_ACCESS_KEY_ID and AWS_SECRET_KEY. The values you specify in these variables must be for a user that has administrative level access to your AWS account. It’s important to note that these variables are not required to be present in the environment when you are starting and running the transactor for normal use, so you don’t need to save them in your .bashrc file or anything like that, but you will have to export them in your terminal console while initializing the Datomic transactor on AWS.

After the ensure-transactor step has completed, assuming you left the ‘aws-transactor-role’ and ‘aws-peer-role’ parameters blank in your input config file (the second argument to ‘bin/datomic ensure-transactor’ above), then the output config file will have been modified to include role names of ‘datomic-aws-transactor’ and ‘datomic-aws-peer’ respectively. A look at your AWS account’s IAM settings will reveal that these roles were in fact created by the ensure-transactor process.

At this stage, you can run


to sanitize your environment, and then execute

bin/transactor <my-config-file-modified>

with the modified transactor config file produced by the ensure-transactor process.

Get started with core.async

Clojure’s core.async library is simply an amazing piece of software to use. It’s also not necessarily the easiest thing to wrap your brain around when you first encounter it. This talk from ClojureConj’13, by Timothy Baldridge, was a very useful treatment of the subject. Timothy is one of the main authors of the library, so he certainly understands the subject well. His file full of examples is also valuable to review, both while watching his talk as well as for future reference.

What do you like about Immutant?

In my talk at ClojureConj '13, I encouraged those in attendance who had not used the Immutant application server for Clojure to take the time to become familiar. During the Q&A following my talk, Rich Hickey asked the question that is the title … [Continue reading]

Conj Talk

The video from my talk at ClojureConj 2013 has been posted. You can view it here. It was a mildly terrifying experience getting up to speak in front of the ~450 in attendance, but I'm truly glad I did it. The next opportunity to speak to a meeting … [Continue reading]

Make your JQueryUI datepicker work from ClojureScript

I needed a datepicker on a form, and in this particular application I'm avoiding writing any javascript to force myself to learn more about ClojureScript. First, you'll need to have jQuery and jQuery UI included in your page. I was using Bootstrap … [Continue reading]

Quite a Loss

This world lost quite a man this week. Col. Robert L. Johnston (Ret.) was a strong, brave, and wonderful man. He loved his God, his bride, his family, his church and his friends both well and deeply. His kindness was extended to many, including … [Continue reading]

You’re going to Clojure/conj 2013!

That's the registration confirmation heading when you register for Clojure/conj. By far the best part of being chosen to present a talk at the Conj is knowing that I'll have the opportunity to take in all the other talks, and to interact with the … [Continue reading]

ClojureConj ’13

I was surprised and thrilled to learn on Monday that one of the talks I submitted for ClojureConj 2013 has been selected for the conference program. The short version is that my talk covers the migration of a project I've been working on over the … [Continue reading]

Clojure Testing – Just a Smidje

I've changed testing libraries for my Clojure code. When I first started writing tests for Clojure code, I settled on expectations, which was written by Jay Fields. The syntax and structure seemed natural enough, and I was a content with my … [Continue reading]

Noir on Immutant

I have been using the Noir web application framework some recently, and had not identified a more permanent way to run Noir apps in production than simply java -jar my_app.jar After some investigation in recent weeks (along with co-workers), and … [Continue reading]