You are currently viewing Install DynamoDB In Local System

Install DynamoDB In Local System

Install DynamoDB In Local System

Hello Everyone

Welcome to CloudAffaire and this is Debjeet

In the last blog post, we have discussed different components and features of DynamoDB.

https://cloudaffaire.com/dynamodb/

In this blog post, we are going to install DynamoDB in our local system and then make a connection to it and create a table. You can setup DynamoDB in your local system that can be served as a test or dev environment. Since AWS charges for DynamoDB, it will be a cost-effective way to explore different components of DynamoDB in your local system.

Install DynamoDB In Local System:

Step 1: Get the DynamoDB installation package and install it to your local system.

You can download the package from below link. We are using windows as our local system OS.

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.DownloadingAndRunning.html

Install DynamoDB In Local Server

Step 2: Extract the file in your local system.

Install DynamoDB In Local Server

Step 3: Open PowerShell and navigate to the location where you have extracted the files and type

Install DynamoDB In Local Server

Note: DynamoDB started in our local system and will keep running until this window is open. There are several parameters that you can set for DynamoDB running in your local system. But we will keep the default ones.

Next, we will connect to the DynamoDB using AWS CLI. If you don’t have AWS CLI setup already, follow below link and install AWS CLI in your local system.

https://docs.aws.amazon.com/cli/latest/userguide/install-windows.html

You will also need an IAM role with Access Key and Secret Key for the DynamoDB connection.

Step 4: Configure AWS with IAM role Access Key and Secret Key.

Open a command prompt and type aws configure. Provide Access Key, Secret Key, region and default output format.

Install DynamoDB In Local Server

Step 5: Connect to the DynamoDB local instance and list tables.

Install DynamoDB In Local Server

Note: For local DynamoDB instance you have to provide endpoint URL as localhost:8000. Currently, no table exists in our local DynamoDB instance. Next, we are going to create a table.

Step 6: Create a DynamoDB table.

To create a table execute below command

Install DynamoDB In Local Server

If we list the table now, it will show our newly created table.

Install DynamoDB In Local Server

Hope you have enjoyed this article. In the next blog post, we are going to discuss DynamoDB API.

To get more details on DynamoDB, please refer below AWS documentation

https://docs.aws.amazon.com/dynamodb/index.html

 

This Post Has One Comment

Leave a Reply