DynamoDB – Local Installation
The DynamoDB setup only includes the access of your AWS account through which the DynamoDB GUI console can be accessed. However, a local installation can also be done for the same purpose.
Creating AWS account:
- Visit the following website:- https://aws.amazon.com/dynamodb/
- Click on the “Get Started with Amazon DynamoDB” button, or the “Create an AWS Account” button.
- Fill in the required information for account creation.
- Choose the plan that best suits you and you are good to go.
After the above steps, you can sign in to the AWS console and then navigate to the DynamoDB console.
AWS (Amazon Web Service) provides a version of DynamoDB for local installations. Applications can be created in this type of setup without any web connection. It also significantly diminishes provisioned throughput, data storage, and transfer fees by allowing a local database.
Deployment of applications created on local installation can be done by making small changes to it for AWS use.
To set up DynamoDB locally follow the below steps:
- Download DynamoDB .tar file specific to your area using the following link:- https://s3.ap-south-1.amazonaws.com/dynamodb-local-mumbai/dynamodb_local_latest.tar.gz
- Extract the downloaded file and move it to the location where you want to install the console.
- Now using the command prompt navigate to the location where you moved the extracted data and run the below command:
java -Djava.library.path=./DynamoDBLocal_lib -jar DynamoDBLocal.jar -sharedDb
- After this to access DynamoDB either through AWS CLI or command prompt, we need to configure our credentials as shown below:
AWS Access Key ID: "YourKeyId" AWS Secret Access Key: "YourSecretAccessKey"
- Start writing applications. To access DynamoDB running locally with the AWS CLI (Command Line Interface), use the –endpoint-url parameter. For example, use the following command to list DynamoDB tables.
aws dynamodb list-tables --endpoint-url http://localhost:8000
Now your local installation is all set and you can start building your application.
At the deployment stage, you will need to make changes to your code. The changes depend on code language and a few other factors. The primary change consists of altering the endpoint from a local point to an AWS region. Other changes are based on a requirement-centric analysis of your application.
Difference between local and web-based setup:
The key difference between the local setup and web-based setup of DynamoDB are listed below:
- Tables are created instantaneously in local setup but the services provided by AWS consume more time.
- Generally, the local installation ignores throughput.
- The process of deletion is instantaneous in the local setup.
- Alteration of data is quicker as compared to the web-based setup due to the absence of network overhead.
Please Login to comment...