From the course: AWS for Developers: DynamoDB

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Inserting data into DynamoDB using Node.js

Inserting data into DynamoDB using Node.js - Amazon Web Services (AWS) Tutorial

From the course: AWS for Developers: DynamoDB

Start my 1-month free trial

Inserting data into DynamoDB using Node.js

- [Instructor] Now that we have our locally-provisioned table, let's go ahead and take a look at some of the data that's in it. I'll go ahead and scan that table with the endpoint URL; it's a localhost 8000. You see I have no items in this table. Let's go ahead and write some code and add some. If I go back to my 03_04 example folder for this video, you'll see there's three files in there with data in them. There's one called games.json, there's players.json, and teams.json. The structure is similar to what we were using before, except you notice there are no put items as we were using in the command line batch inserts. We just have an array of items with the type and the value to insert. Let's go ahead and hit the plus icon and let's create an insert.js file here. We're going to go ahead and declare our AWS instance by requiring aws-sdk on line one. We're going to go ahead and configure which instance we're going to talk to. I'm going to update the config. We're going to set this to…

Contents