- Download local DynamoDB
- Unzip to a local folder
> mkdir ~/mydynamodb
> cd ~/mydynamodb
> unzip -a ~/Downloads/dynamodb_local_latest.zip
- Start the database (specify the port by adding
-port xxxx
)
> java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb -port 9001
- You will see below message
Initializing DynamoDB Local with the following configuration:
Port: 9001
InMemory: false
DbPath: null
SharedDb: true
shouldDelayTransientStatuses: false
CorsParams: *
- Connect to the database and list tables (AWS CLI is required)
> aws dynamodb list-tables --endpoint-url http://localhost:9001
- The list should be empty at this moment
{
"TableNames": []
}
Done!