http://docs.aws.amazon.com/ja_jp/amazondynamodb/latest/developerguide/CodeSamples.html
以下からダウンロードする。 http://docs.aws.amazon.com/ja_jp/amazondynamodb/latest/developerguide/DynamoDBLocal.html
$ java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
$ npm install
$ npm run build
$ node src/CreateTable.js
$ aws dynamodb batch-write-item --endpoint-url http://localhost:8000 --request-items file://data/ProductCatalog.json
$ aws dynamodb batch-write-item --endpoint-url http://localhost:8000 --request-items file://data/Forum.json
$ aws dynamodb batch-write-item --endpoint-url http://localhost:8000 --request-items file://data/Thread.json
$ aws dynamodb batch-write-item --endpoint-url http://localhost:8000 --request-items file://data/Reply.json
問題ない場合は、以下の表示が出る。
{
"UnprocessedItems": {}
}
$ aws dynamodb scan --endpoint-url http://localhost:8000 --table-name ProductCatalog
$ aws dynamodb scan --endpoint-url http://localhost:8000 --table-name Forum
$ aws dynamodb scan --endpoint-url http://localhost:8000 --table-name Thread
$ aws dynamodb scan --endpoint-url http://localhost:8000 --table-name Reply
$ node src/QueryItems.js
$ node src/DeleteTable.js