0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

DynamoDBをローカルで動かす

Last updated at Posted at 2024-05-14

DynamoDBをローカルで動かす

dockerを使用して、DynamoDBをローカルで動かす手順をメモっておきます。

docker-compose.yml

docker-compose.ymlファイルを作成

次を貼り付ける。

docker-compose.yml
version: "3.7"

services:
  dynamodb-local:
    image: amazon/dynamodb-local:latest
    container_name: dynamodb-local
    user: root
    volumes:
      - "./data:/data"
    command: ["-jar", "DynamoDBLocal.jar", "-sharedDb", "-dbPath", "/data"]
    ports:
      - "8000:8000"

  dynamo-admin:
    image: aaronshaf/dynamodb-admin:latest
    container_name: dynamo-admin
    environment:
      DYNAMO_ENDPOINT: http://dynamodb-local:8000
    ports:
      - "8001:8001"
    depends_on:
      - dynamodb-local

起動

docker compose up
# または
docker compose up -d

http://localhost:8001にアクセスすると、dynamo-adminが開きます。

image.png

エンドポイント

dynamodbにアクセスするためのエンドポイントは http://localhost:8000 です。

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?