Demo project for Spring Boot + DynamoDB Single Table Design
- Java 17
- Spring Boot
- DynamoDb
Libs
- AWS Java SDK Dynamodb
- Dynamodb Enhanced
Access tb_comics in ./environment/dynamodb/tables.json
Create Table in DynamoDb simulator using Localstack.
docker-compose up -d --build
- Access DynamoDb Admin: http://localhost:8001/
- GET - http://localhost:8080/character
- GET - http://localhost:8080/character/profile/{nickname}
- GET - http://localhost:8080/comics
- GET - http://localhost:8080/comics/{nickname}
curl --location --request GET 'http://localhost:8080/character/profile/greenlantern'
Postman Collection: Comics.postman_collection.json
- You can't use
begin_with
with PartitionKey, you can only use on the SortKey. - Primary keys in DynamoDB can be either simple or composite.
- Simple primary keys are consist of a partition key and no sort key.
- Composite primary keys have both a partition key and a sort key.
- The What, Why, and When of Single-Table Design with DynamoDB
- Amazon DynamoDB single-table design using DynamoDBMapper and Spring Boot
- Single-table vs. multi-table design in Amazon DynamoDB
Developed by Jean Jacques Barros