From the course: Amazon Web Services: Data Analytics

Unlock the full course today

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

Use the AWS SDK for querying DynamoDB

Use the AWS SDK for querying DynamoDB - Amazon Web Services (AWS) Tutorial

From the course: Amazon Web Services: Data Analytics

Start my 1-month free trial

Use the AWS SDK for querying DynamoDB

- [Instructor] Now that we've set up the AWS SDK for node, verified node and verified the SDK, we're going to actually use it to program against some of our data services. The service I picked was DynamoDB. In the console, as a starting point, you'll remember from previous movies that we have two tables, so you can see we have our customers table and our MusicCollection table. Now, if we want to programmatically see what tables we have and work with it, here's how the code works. The first line of code is similar to what we saw when we looked at the S3 configuration in the previous movie. You can see we're requiring the AWS SDK. In line two, I'm just updating the configuration file to point to the US East region. In line four, we're creating a local variable for DynamoDB passing in the API version attribute, which is a pattern for this SDK. Line six is really the key line of this particular code file. Using our local variable ddb, we're calling the listTables method, limiting to 10…

Contents