Skip to main content

DynamoDB Example Code for NodeJS

DynamoDB Documentation

Introduction​

In this tutorial I'm going to show you how you can use NodeJS to store, query, and update data in an AWS DynamoDB data table.

What is DynamoDB?​

If you're watching this, you likely already know what DynamoDB is but just in case - DynamoDB is a fast and easy to use NoSQL database service from Amazon Web Services. It's fully managed, so there's no software to install or hardware to configure.

Getting started​

To use DynamoDB you'll need to have an Amazon Web Services account. If you don't have one you can signup at aws.amazon.com.

I like DynamoDB for three main reasons: it's easy to use, it's super scalable, and it's affordable. In fact, for most small apps you probablly won't pay anything because Amazon provides a free usage tier that's pretty generous.

  1. Get an AWS account
  2. Pricing
  3. The AWS Management Console
  4. Creating a table in the Management Console
  5. The AWS SDK for NodeJS
  6. Using NPM to install the AWS SDK
  7. Creating a table - key value stores, document stores
  8. Inserting records
  9. Querying records
  10. Updating records
  11. Deleting records