Skip to content

Sample Application, with CRUD operations using DynamoDB(NoSQL database) SDK AWS Resource.

Notifications You must be signed in to change notification settings

viborotto/sample-java-dynamo-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sample-java-dynamo-sdk

Sample Application, with CRUD operations using DynamoDB(NoSQL database) SDK AWS Resource.

Start DynamoDB Local

We have 2 options to start dynamoDB local

  1. Command in Terminal

    Download and Extract zip before execute command...

    Go to directory extracted and execute:

    java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
  2. With Docker Compose

    We have a docker-compose.yml with steps to run

     docker-compose up
  • To verify dynamodb local is working access in browser localhost:8000/shell

Create Table and Populate in DynamoDB Local

  1. Create Table

       aws dynamodb create-table --cli-input-json file://music_table.json --endpoint-url=http://localhost:8000
    • Verify if tabla was created with success:
       aws dynamodb list-tables --endpoint-url=http://localhost:8000
  2. Populate data with POST

    • url: localhost:8080/aws/dynamo/musics
      • body request:
       {
           "id":"1",
           "artist": "Vittoria",
           "songTitle": "Go DynamoDB",
           "albumTitle": "AWS",
           "year": 2021
       }
      • HTTP Status 201
  3. Verify Registration in Table

       aws dynamodb scan --table-name Music --endpoint-url http://localhost:8000

About

Sample Application, with CRUD operations using DynamoDB(NoSQL database) SDK AWS Resource.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages