DEV Community

hwangs12
hwangs12

Posted on

Running dynamoDB locally

This is in part summary of a YouTube video: link here

Question to start with: How do I run dynamoDB locally? I do not want to risk all my codes going into AWS and mess things up there (big aws charges).

Prerequisites

Clone this repo: https://github.com/SamWSoftware/ServerlessYoutubeSeries/tree/l19-serverless-offline

Once cloned, run the following commands in your working directory.

npm install
Enter fullscreen mode Exit fullscreen mode
sls dynamodb install
Enter fullscreen mode Exit fullscreen mode

this will create a local dynamodb instance in your working directory.

then run

sls offline start --stage dev
Enter fullscreen mode Exit fullscreen mode

once done, use postman to test whether your local endpoint is connected to the dynamodb!!!

Top comments (0)