A reference implementation for Spring Boot Webflux integration with AWS DynamoDB using AWS Async Client.
- Java 11
- Spring Boot 2.2.2
- Gradle 6.0.1
- AWS SDK 2.10.40
Follow the steps at https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html
-
Download the AWS DynamoDB Local JAR from above link and unzip it
-
Run the local dynamodb jar
java -Djava.library.path=./DynamoDBLocal_lib/ -jar DynamoDBLocal.jar
-
Create customer table in dynamodb.
aws dynamodb create-table --table-name customers --attribute-definitions AttributeName=customerId,AttributeType=S --key-schema AttributeName=customerId,KeyType=HASH --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 --endpoint-url http://localhost:8000
-
Verify the table is created.
aws dynamodb list-tables --endpoint-url http://localhost:8000
Output:
{ "TableNames": [ "customers" ] }
./gradlew bootRun