alessandrosimi / aws-dynamodb-nio

Aws DynamoDB Non-Blocking IO Client


Latest release:
License: Apache 2.0

Aws DynamoDB Non-Blocking IO Client

Scala dynamoDB client built on top of Apache async http client with almost the same API provided by AWS SKD for Java(tm).

Why Non-Blocking IO?

Aws DynamoDB NIO Client compared with other clients uses Non-Blocking IO, so no threads are blocked during the call to Aws services. Other async clients use the AWS SKD for Java that is blocking while Aws DynamoDB NIO Client re-implements the SKD with Apache async http client (NIO).

Easy to use

The client is easy to use especially if you are familiar with the official AWS api.

val blockingClient = new AmazonDynamoDBClient()
val tableList: ListTablesResult = blockingClient.listTables

val nioClient = new AmazonDynamoDBNioClient
val futureTableList: Future[ListTablesResult] = nioClient.listTables
  .map(tableList => tableList.getTableNames)

The NIO client API differs from the original Amazon Api in two points: it needs an implicit execution context to run it and the setRegion(...) and setEndpoint(...) methods return a new client with the value changed.

How to get it

You can add DynamoNio client as a maven dependency for scala 2.11 ...


... or for scala 2.12 ..


The current supported AWS vesion is

Philosophy behind

Aws DynamoDB NIO Client re-implements the AWS SKD for Java keeping the same signature except for the return type of each method that is wrapped in a Future[T].

For example the putItem(...) method changes its signature from

def putItem(PutItemRequest putItemRequest): PutItemResult;


def putItem(PutItemRequest putItemRequest): Future[PutItemResult];


Aws DynamoDB NIO Client has few limitations or differences from AWS SKD for Java.

  1. It does not implement any retry logic
  2. It does not collect any metrics
  3. It does not implement any proxy logic