Skip to content

Commit

Permalink
Readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
viralpatel committed Dec 25, 2019
1 parent 710bd75 commit e4723d7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
27 changes: 22 additions & 5 deletions README.md
Expand Up @@ -8,17 +8,34 @@ A reference implementation for Spring Boot Webflux integration with AWS DynamoDB
4. AWS SDK 2.10.40

### Running AWS DynamoDB locally without Docker
1. Download the AWS DynamoDB Local JAR
2. Run the local dynamodb
Follow the steps at https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html

1. Download the AWS DynamoDB Local JAR from above link and unzip it

2. Run the local dynamodb jar

`$ java -jar `
```
java -Djava.library.path=./DynamoDBLocal_lib/
-jar DynamoDBLocal.jar
```

3. Create customer table in dynamodb.

`$ aws dynamodb create-table `
```
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
```

4. Verify the table is created.

`aws dynamodb list-tables --endpoint-url http://localhost:8000`
```
aws dynamodb list-tables
--endpoint-url http://localhost:8000
```

Output:
```
Expand Down
Expand Up @@ -12,7 +12,8 @@
public class DynamoDBConfig {

@Bean
public DynamoDbAsyncClient dynamoDbAsyncClient(@Value("${application.dynamodb.endpoint}") String dynamoDBEndpoint) {
public DynamoDbAsyncClient dynamoDbAsyncClient(
@Value("${application.dynamodb.endpoint}") String dynamoDBEndpoint) {
return DynamoDbAsyncClient.builder()
.endpointOverride(URI.create(dynamoDBEndpoint))
.credentialsProvider(DefaultCredentialsProvider.builder().build())
Expand Down

0 comments on commit e4723d7

Please sign in to comment.