How to setup and use DynamoDb Locally - Free

Manager — SDE
Search for a command to run...

Manager — SDE
No comments yet. Be the first to comment.
← Previous: What’s New in the SDK and Tooling for .NET 9 .NET Aspire is a set of tools, templates, and packages designed to help developers build observable, production-ready apps that embrace cloud-native and distributed computing best practices. .N...

← Previous: What’s New in .NET Libraries for .NET 9 The .NET 9 SDK introduces several new capabilities and improvements to streamline development workflows, enhance build and test experiences, improve NuGet security and performance, and provide great...

← Previous: What’s New in .NET MAUI for .NET 9 .NET 9 adds a wide range of enhancements and new APIs across the base class libraries. These improvements touch everything from low-level data structures and cryptography to JSON serialization, text pr...

← Previous: What’s New in ML.NET .NET Multi-platform App UI (.NET MAUI) in .NET 9 focuses on improving overall product quality, test coverage, performance, and stability. While previous releases introduced major new capabilities and controls, the emp...

← Previous: What’s new in ASP.NET Core 9.0 ML.NET continues to evolve as a full-featured, open-source machine learning framework for .NET developers, enabling you to create, train, and deploy custom ML models directly in your .NET applications. ML....

Did you know DynamoDB from AWS has a locally downloadable version which you can install on your local machine and use for development and testing purposes.
As a newbie to AWS, I was unable to find any comprehensive guide on how to setup and use DynamoDB locally. So without further ado, let's start.
There are 3 ways you can download:
Standalone jar file
Using Docker
Using an Apache Maven
I'm using Docker for this tutorial, for instructions on other 2 ways, visit this official AWS site
Please note your application doesn't have to be a containerized application, we're just using DynamoDB database as a container, that's it.
DockerMake sure you have docker up and running. If you've not, follow this official instructions
docker run -p 8000:8000 amazon/dynamodb-local
This will download DynamoDB locally from official Docker image and run. If everything is okay, you'd see output something like this:
Initializing DynamoDB Local with the following configuration:
Port: 8000
InMemory: true
DbPath: null
SharedDb: false
shouldDelayTransientStatuses: false
CorsParams: *
This would run the fully functional DynamoDB instance at http://localhost:8000.
If don't have AWS CLI installed, follow this official guide
Run this command to verify the installation
aws dynamodb list-tables --endpoint-url http://localhost:8000
If you get an error like this:
You must specify a region. You can also configure your region by running "aws configure".
You can run:
aws configure
And you'd be asked to setup follwoing:
AWS Access Key ID:
AWS Secret Access Key :
Default region name [x]:
Default output format [None]:
You can enter any values, as you're only using DynamoDB locally.
That's it!
That's how you can configure AWS DynamoDB on your local machine to develop and test your applications without spending anything.
Happy Coding!
Originally posted at my blog: https://blog.satishyadav.com/how-to-setup-and-use-dynamodb-locally-free