Testcontainers module for Dynalite. Dynalite is a clone of DynamoDB, enabling local testing.
Running Dynalite as a stand-in for DynamoDB in a test:
public class SomeTest {
@Rule
public DynaliteContainer dynamoDB = new DynaliteContainer();
@Test
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 normallyIn 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.
Add the following dependency to your pom.xml/build.gradle file:
testCompile "org.testcontainers:dynalite:{{latest_version}}"<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>dynalite</artifactId>
<version>{{latest_version}}</version>
<scope>test</scope>
</dependency>!!! hint 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.