DEMO: Creating a DynamoDB Database
DEMO: Creating a DynamoDB Database
1h 36m

This course covers the core learning objective to meet the requirements of the 'Designing Database solutions in AWS - Level 1' skill

Learning Objectives:

  • Understand when to Install databases on Amazon EC2 instances compared to AWS managed databases
  • Understand the differences between the various AWS Database Types
  • Analyze when to use Amazon RDS and Amazon DynamoDB for a given workload

Hello, and welcome to this lecture. This is going to be a demonstration on how to quickly, and easily create a DynamoDB database. Now, first I'll need to go to the database category, and here we can see DynamoDB. Now I don't have any DynamoDB databases sets up yet. So if you select create table, and you'll be presented with this screen.

So first we'll need to give it a table name, just call this my database and also a primary key. Now the primary key is essentially used to uniquely identify each item in the table. And the primary key is essentially comprised of a partition key. So let me just add one in. I'll just call this product ID, and we can slate either a string, binary, or a number. I'll leave that as a string. If we need to, we can also add in a sort key as well. And as we can see here the sort key simply allows you to search within a partition. Just remove that sort key.

Now essentially you can now create your table simply from providing that information, because this tick box here allows you to use lots of default settings that essentially fills in the rest of the configuration for you. So if you're happy with your table name and primary key, with these default settings for your table, you can simply click create and it's done. However, I want to uncheck the default settings so you can see the different configurable components used. So let's take a look.

Now, firstly we have our secondary indexes, so you can add a secondary index, and these allow you to perform queries on attributes that are not part of the table's primary key. Next, we have our read and write capacity mode, either provisioned or on demand. If we select the provisioned capacity mode, then we can select our read capacity units, and also our write capacity units.

Now scrolling down a bit further to auto scaling. We can set up auto scaling for our read and write capacity units. So when the read capacity gets to 70% utilization, we can scale up to a maximum of 40,000 units, and the same with the write capacity. So you can alter these figures if you need to, and change them to whatever values you need. As a part of that auto scaling process, DynamoDB needs an auto-scaling service link role to give it permission to do so.

Once you're happy with your read and write capacity units, we can then scroll down to encryption at rest. Now by default encryption is enabled. The default option uses a key that's owned by DynamoDB, and you are not charged for the use of any encryption keys in this default setting. However, you can use a KMS custom managed CMK, which is the CMK that you may have created, and you can select it from this box here, if you have any and enter the ARN, or you can use the KMS AWS managed CMK, which is this key here.

So it depends on the level of control that you want for the encryption key. First demonstration I'm just gonna leave it as the default. At the bottom here, you can add any text to a database if you'd like. So once you're happy with the configuration, you simply click on create. As we can see the table is being created. And once it's created, you can then use these tabs along the top to set up any alarms and review your capacity units set up your indexes, backups, etc, etc, etc. But for this demonstration, I simply wanted to show you how quickly and easy it is to set up and configure a DynamoDB table.

About the Author
Learning Paths

Stephen is the AWS Certification Specialist at Cloud Academy. His content focuses heavily on topics related to certification on Amazon Web Services technologies. He loves teaching and believes that there are no shortcuts to certification but it is possible to find the right path and course of study.

Stephen has worked in IT for over 25 years in roles ranging from tech support to systems engineering. At one point, he taught computer network technology at a community college in Washington state.

Before coming to Cloud Academy, Stephen worked as a trainer and curriculum developer at AWS and brings a wealth of knowledge and experience in cloud technologies.

In his spare time, Stephen enjoys reading, sudoku, gaming, and modern square dancing.