Amazon DynamoDB, AWS

4 Mins Read

How to Access and Create DynamoDB table Locally using DynamoDB Local

Amazon DynamoDB is a serverless, key-value, document-based NoSQL database service that performs single-digit millisecond for workloads of all sizes. You may design database tables using DynamoDB that can handle any request traffic volume and store and retrieve any quantity of data. The throughput capacity of your tables can be scaled up or down without causing any downtime or performance reduction.

There are various options to access and control your DynamoDB tables:

  • AWS CLI
  • AWS Management Console
  • NoSQL Workbench
  • PartiQL
  • SDKs
  • DynamoDB Local

DynamoDB Local

DynamoDB Local is a downloadable version of Amazon DynamoDB that helps you develop and test applications without accessing the DynamoDB web service, and the database is self-reliant on your computer. When you’re ready to deploy your application in production, you remove the local endpoint from the code and point it to the DynamoDB web service. Having this local version can reduce costs associated with data transfer, storage, and throughput. Moreover, you can create your application without an online connection throughout this time. You can download (JRE required) or use a Docker image to access DynamoDB locally. It is also available as an Apache Maven dependency.

  • Cloud Migration
  • Devops
  • AIML & IoT
Know More

Setting up and deploying DynamoDB Local on your computer

To use DynamoDB Local, you must have these: –

1. Java installed

2. AWS CLI

3. DynamoDBLocal.jar

You can use DynamoDB locally by downloading an executable.jar file (Deploying DynamoDB locally on your computer – Amazon DynamoDB). Windows, Linux, macOS, and other operating systems that support Java can use the application.

 

Step 1: Install DynamoDBLocal.jar from the above link, and the region that is taken here is Mumbai. Once the archive has been downloaded, extract its contents, then move the extracted directory to a desired location. Here, the location is C:\ProgramFiles\DynamoDBWorkbench\DDBLocal\DynamoDBLocal_lib

Step 2: Open a command prompt window and go to the directory where you extracted DynamoDBLocal.jar to start DynamoDB on your machine. We created another folder named DynamoDBLocal in the C drive, put the downloaded file there, and then extracted the files. Then, go to that folder in the command prompt by the following command.

Amazon DynamoDB: Steps

Step 3: Enter the following command to start DynamoDB on your computer:

Then you will see the following output as shown in the screenshot below:

Amazon DynamoDB: Steps 2

Step 4: Now click on the + sign on top of the command prompt to open another tab in the terminal window. Now, before you can access DynamoDB programmatically or through the AWS Command Line Interface (AWS CLI), you must configure your credentials to enable authorization for your applications. So run the following command and then enter the access key and secret access key:

Step 5: Then, use the following command to list the DynamoDB tables that are there in your local system.

As there is no table as of now, we will get the output as shown in the screenshot below.

So here we have two tabs: in one tab, DynamoDB Local is running, and in the next tab, it is used for the commands to work with DynamoDB.

Step 6: Now, one table needs to be created, and for that, use the command given below:

 

Again, list the table with the previous command, and you will get the following output:

So now, one table is there in DynamoDB local.

 

Amazon DynamoDB web service is a managed service that is perfect for production use due to its qualities of durability, scalability, and availability. DynamoDB can be accessed in multiple ways. One of the ways is to use DynamoDB locally. DynamoDB is used mostly for development and testing purposes only. You can create your tables and test them locally.

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, AWS Training Partner, AWS Migration Partner, AWS Data and Analytics Partner, AWS DevOps Competency Partner, Amazon QuickSight Service Delivery Partner, Amazon EKS Service Delivery Partner, Microsoft Gold Partner, AWS Microsoft Workload Partners, Amazon EC2 Service Delivery Partner, and many more.

To get started, go through our Consultancy page and Managed Services PackageCloudThat’s offerings.

Get your new hires billable within 1-60 days. Experience our Capability Development Framework today.

  • Cloud Training
  • Customized Training
  • Experiential Learning
Read More

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, AWS Training Partner, AWS Migration Partner, AWS Data and Analytics Partner, AWS DevOps Competency Partner, Amazon QuickSight Service Delivery Partner, Amazon EKS Service Delivery Partner, Microsoft Gold Partner, AWS Microsoft Workload Partners, Amazon EC2 Service Delivery Partner, and many more.

To get started, go through our Consultancy page and Managed Services PackageCloudThat’s offerings.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!