Skip to content

Instantly share code, notes, and snippets.

@anataliocs
Forked from zircote/run_dynamodb_local.sh
Created November 21, 2016 18:34
Show Gist options
  • Save anataliocs/45321a64d9d44d874e21c9f3e9367d0c to your computer and use it in GitHub Desktop.
Save anataliocs/45321a64d9d44d874e21c9f3e9367d0c to your computer and use it in GitHub Desktop.
A quick run script to get a AWS DynamoDB Local instance going
#!/bin/sh
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
RUN_DIR=${DIR}/.dynamodb
DYNAMODB_LOCAL="http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz"
PORT=8000
ARGS="-inMemory -port ${PORT}"
install_dynamo_db(){
mkdir -p $1
curl -L $2 | tar xvz -C $1
}
if [ ! -f ${RUN_DIR}/DynamoDBLocal.jar ]; then
install_dynamo_db ${RUN_DIR} ${DYNAMODB_LOCAL}
fi
`which java` -Djava.library.path=${RUN_DIR}/DynamoDBLocal_lib -jar ${RUN_DIR}/DynamoDBLocal.jar ${ARGS}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment