====== Local install of AWS DynamoDB ====== ===== Notes ===== Note, the local install still relies on keys and connecting to IAM on the AWS mothership, so it is not really an isolated setup. [[https://medium.com/@vikramaroskar/setting-up-local-dynamodb-as-a-service-1908919d4347]] Install to ''/usr/local/bin/dynamodb/'' ===== Start DynamoDB as service ===== root@test-pythonwebserver:~# cat /etc/systemd/system/dynamodb.service [Unit] Description=Dynamo DB Local Service [Service] User=root # The configuration file application.properties should be here: #change this to your workspace WorkingDirectory=/usr/lib/dynamodb #path to executable. #executable is a bash script which calls jar file ExecStart=/usr/local/bin/dynamodb/start.sh SuccessExitStatus=143 TimeoutStopSec=10 Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target root@test-pythonwebserver:~# systemctl daemon-reload root@test-pythonwebserver:~# ls -l /usr/lib/dynamodb total 16 -rw-r--r-- 1 root root 16384 May 13 15:51 shared-local-instance.db root@test-pythonwebserver:~# root@test-pythonwebserver:~# cat /usr/local/bin/dynamodb/start.sh #!/bin/sh sudo java -Djava.library.path=/usr/local/bin/dynamodb/DynamoDBLocal_lib -jar /usr/local/bin/dynamodb/DynamoDBLocal.jar -sharedDb root@test-pythonwebserver:~# root@test-pythonwebserver:~# systemctl enable dynamodb root@test-pythonwebserver:~# systemctl status dynamodb