install_dynamodb.sh 695 B

12345678910111213
  1. #!/usr/bin/env bash
  2. sudo apt-get update && sudo apt-get install -y default-jre supervisor
  3. mkdir /opt/dynamodb-local
  4. cd /opt/dynamodb-local && curl --retry 5 --retry-delay 1 -L http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz | tar zx
  5. cd -
  6. echo '[program:dynamodb-local]' | sudo tee /etc/supervisor/conf.d/dynamodb-local.conf
  7. echo 'command=java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -inMemory' | sudo tee -a /etc/supervisor/conf.d/dynamodb-local.conf
  8. echo 'directory=/opt/dynamodb-local' | sudo tee -a /etc/supervisor/conf.d/dynamodb-local.conf
  9. sudo service supervisor stop
  10. sudo service supervisor start
  11. sleep 10
  12. curl localhost:8000