- [Adam] In this demonstration, we're going to build out an Amazon DynamoDB table, and then we're going to run a query against it. So, let's get started. At the AWS Management Console, we'll go ahead and look for DynamoDB in the search bar. It pops right up. Click, and then I'm presented with the service front page. Now, there is some learning opportunities here, but, again, we're focusing on creating a table. So, I'm going to click Create table. For our Table name, we'll put "Music," the Partition key will be "Artist," and in this case, I'd like to add a sort key, because artists could have more than one song. Typically, they do. So, let's go ahead and make the sort key "Song Title." Great. Now, let's scroll down. We could select the default settings, and as you can see on the screen, it sets it up with really no fuss about performance or any of the other parameters that you would typically have to set. It just gets you up and running. In this case, I'm going to deselect the default settings, and that's so I can show you the different areas that you could configure for DynamoDB. Scrolling down, you'll see that you can add secondary indexes. By the way, if it's a local secondary index, which this would be, this is your one and only opportunity to add it. Read and Write capacity mode. We can choose whether we want this Provisioned, or if we want it placed into that On-demand, which remember is a very forgiving environment for us to run our DynamoDB in. In this case, we're going to stick on the free tier, and use Provisioned at 5 Read and 5 Write capacity units. Auto Scaling is next. You'll notice that you can auto scale your Read and your Write, one or the other, or both, and you set this by the total utilization of the Read or the Write units. Scrolling down further, I have the ability to use an IAM role that already exists, or I can have the DynamDB service create that for me. Scroll down further, and then enable Encryption At Rest. You can select encryption settings for your DynamoDB, DEFAULT or KMS. I'm going to just review my settings here, and I'm going to click Create. The table is being created, and it takes anywhere from 1 to 3 minutes, on average. Now that the table has been created, I'm going to want to add some items. So, let's take a look at the Items tab. I'll click on the Create item button, and a window appears. This allows me to enter the values for Artist and Song Title. So for Artist, I have a favorite artist of mine, and that is Jon. My favorite song of Jon's is the Maple Syrup Blues. Okay. I've added my artist and my song, and now, you'll see that the item appears. I'm going to add a few other items to the table, and then we'll come back. All right, now that we have all of our items populated in the table, I'm going to run a query. So, I'm going to click the pull-down. It says Scan currently, but don't worry, there's a Query under that. We click Query, and we're going to set our values to run this on. You notice that the Partition key is Artist. The Sort key is Song Title. So in this case, I'd like to say that I want see all the songs written or sung by Evan. I place him in the key for the Artist, and I click Search, because I don't need to enter a specific song title value, because he has many songs that he's written or sung. In this case, "All My AMI's Live in Texas" and "S3 Rhapsody" are Evan's two hits that I have populated in the table. All right, so that was how you build out a DynamoDB table, enter items, and run your first query. Well, that's it for the DynamoDB demonstration. You're going to be able to apply what you've just learned in the exercise that Rick has put together for you. I'll see you in future topics.