Sign inSign up

kraynezero/aws-dynamodb-local

By kraynezero

•Updated over 9 years ago

DynamoDB local intended for local development

Image
2

10K+

kraynezero/aws-dynamodb-local repository overview

⁠AWS DynamoDB local

Source⁠

Runs DynamoDB Local⁠ in "shared DB" mode (one set of tables regardless of region and credentials). The server is exposed on port 8000.

To optionally initialize your local deployment (with tables, prepopulated data, etc.), you can mount a host directory as a data volume to /bootstrap. The following file types will be used for initialization.

  • *.sh files will be executed, and the environment variable, $DYNAMO_ENDPOINT_URL will be available in the scripts. For example:

    #!/bin/bash
    
    aws dynamodb create-table \
      --table-name mytable \
      --attribute-definitions AttributeName=id,AttributeType=S \
      --key-schema AttributeName=id,KeyType=HASH \
      --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
      --endpoint-url $DYNAMO_ENDPOINT_URL
    
  • *.json files should contain a json table definition⁠. For example:

    {
      "TableName": "mytable",
      "KeySchema": [
          {
              "AttributeName": "id",
              "KeyType": "HASH"
          }
      ],
      "AttributeDefinitions": [
          {
              "AttributeName": "id",
              "AttributeType": "S"
          }
      ],
      "ProvisionedThroughput": {
          "ReadCapacityUnits": 5,
          "WriteCapacityUnits": 5
      }
    }
    

Sample command: docker run -v /path/to/bootstrap:/bootstrap -p 8000:8000 kraynezero/aws-dynamodb-local

Tag summary

Content type

Image

Digest

Size

622.5 MB

Last updated

over 9 years ago

docker pull kraynezero/aws-dynamodb-local