• < home >
  • < about >
  • < blog >

Install DynamoDB Local on EC2 Instance

by admin· July 28, 2015· in AWS, Blog· 0 comments
Go to a directory below the root of your website (usually /var/www/). Get the latest version of DyanmoDB local from Amazon using the command below. wget http://dynamodb-local.s3-website-us-west-2.amazonaws.com/dynamodb_local_latest.tar.gz Unzip the file after you get it. tar -zxvf dynamodb_local_latest.tar.gz Remove the tar.gz file after unzipping it. rm -f dynamodb_local_latest.tar.gz You then need to run this command to start DynamoDB local. java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb To run this on boot of the server, you can setup or add to the boot script of the server. The boot script file on CentOS is: /etc/rc.d/rc.local You would just add the below to the file. Adding the ‘&’ at the end will make it non-blocking so if you have processes that need to run after it. java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb & Once you have it setup and running you can use the javascript shell that comes with it to add tables or input, edit and delete items. http://yourdomain.com:8000/shell I used PHP and interacted with the setup. This got a little tricky and I found the documentation provided by Amazon is incorrect with the configuration. Instead of ‘endpoint’ you need to use ‘base_url’ and you also need your key and secret even though they will […]
Read More
Categories
  • AWS
  • Blog
  • Development Tools
  • Uncategorized
Archives
  • March 2016
  • October 2015
  • July 2015
  • May 2015
  • March 2015
Copyright © 2008 jeremygerk. All Rights Reserved.