Skip to content

Instantly share code, notes, and snippets.

public class DynamoDBLocalStarterTest {
private static final String TEST_TABLE_NAME = "user_tests";
private static final String TEST_TABLE_HASH_KEY = "user_id";
private static final String TEST_TABLE_RANGE_KEY = "user_type";
public static AmazonDynamoDB startDDBLocal() {
return DynamoDBEmbedded.create().amazonDynamoDB();
}
<!-- DynamoDB SDK -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-dynamodb</artifactId>
</dependency>
<!-- DynamoDBLocal lib -->
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>DynamoDBLocal</artifactId>
<version>[1.12,2.0)</version>