Skip to content

Dynalite Module

Testcontainers module for Dynalite. Dynalite is a clone of DynamoDB, enabling local testing.

Usage example

Running Dynalite as a stand-in for DynamoDB in a test:

public class SomeTest {

    public DynaliteContainer dynamoDB = new DynaliteContainer();

    public void someTestMethod() {
        // getClient() returns a preconfigured DynamoDB client that is connected to the
        //  dynalite container
        final AmazonDynamoDB client = dynamoDB.getClient();

        ... interact with client as if using DynamoDB normally

Why Dynalite for DynamoDB testing?

In part, because it's light and quick to run. Also, please see the reasons given by the author of Dynalite and the problems with Amazon's DynamoDB Local.

Adding this module to your project dependencies

Add the following dependency to your pom.xml/build.gradle file:

testCompile "org.testcontainers:dynalite:1.10.6"


Adding this Testcontainers library JAR will not automatically add an AWS SDK JAR to your project. You should ensure that your project also has a suitable AWS SDK JAR as a dependency.