LoginSignup
19
17

More than 5 years have passed since last update.

[DynamoDB] DynamoDBをLocalで使う

Last updated at Posted at 2014-09-03

はじめに

DynamoDBをローカルで起動し、使う方法です。
実行可能jar形式になっているので、VirtualBoxなどは不要です。

ダウンロード

以下からDynamoDB Localをダウンロードします。

実行

以下で実行します。

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

credentialsファイルをつくる

接続時に必要な情報です。

C:\Users\ユーザー名\.aws\credentials

内容はこんなのでよいです。

[default]
aws_access_key_id=Your Access Key ID
aws_secret_access_key=Your Secret Access Key
region=Optional, the default region to use for this profile

接続

以下でDynamoDB Localに接続できます。
あとはご自由に。

AmazonDynamoDBClient dynamoDB = new AmazonDynamoDBClient(new ProfileCredentialsProvider());
dynamoDB.setEndpoint("http://localhost:8000");
19
17
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
17