Create a new DynamoDB table in AWS Console

Tomasz Łakomy
InstructorTomasz Łakomy
Share this video with your friends

Social Share Links

Send Tweet
Published 5 years ago
Updated 4 years ago

Amazon DynamoDB is a fully managed non-relational (NoSQL) database service that provides fast and predictable performance with seamless scalability.

In other words - DynamoDB is entirely managed by AWS (so it's scaled for us, even if our startup has millions of users), it's a NoSQL database so we don't have to start by defining a detailed schema like in a relational database and it's used by companies like AirBnB, Lyft and Samsung in production.

In this lesson we're going to learn how to create a brand new DynamoDB table from scratch using AWS Console

Instructor: [0:00] To get started with DynamoDB, first login to your AWS account. Afterwards you can find DynamoDB under services and database. You can always search for it using this search box. I'm going to click on DynamoDB.

[0:13] I will be showing a DynamoDB landing page, because I don't yet have any DynamoDB tables on this account. What we are going to see over here is basically that DynamoDB is a fast and flexible NoSQL database service for all applications that need consistent, single-digit millisecond latency at any scale.

[0:30] What that means is that you can start small without having to create a detailed schema, because it is a NoSQL database. Once you reach a millions of users in your startup, you will still maintain the single-digit millisecond latency at any scale.

[0:43] With that being said, let me go ahead and click on create table. Next we need to provide the name for this table. I will be creating a database for all my egghead lessons. I'm going to call it myEggheadLessons.

[0:55] Next, we need to define a primary key. A primary key is made up of one of two attributes that uniquely identify items, partition the data, and sort the data within each partition.

[1:04] What that means, is that we have to be able to uniquely identify each lesson with this key. Each egghead lesson has a unique title. I'm going to specify my primary key as a LessonTitle.

[1:14] Afterwards, there's many tables that we can define, but I'm going to leave everything as default. What that means is that I will be using no secondary indexes in this table.

[1:22] The provisions capacity will bet set to five reads and writes, which is more than enough for this sample example. We will have some basic allowance for this table, and we're going to also use the default encryption type for this database.

[1:32] Next, click on Create to create our first DynamoDB table. Right now, we can see that our table is being created. This is going to take a couple of seconds, but afterwards we're going to see our freshly-created DynamoDB table.

[1:43] Now our table has been created. We can see in the table, these are sections that the table Dynamo specified as myEggheadLessons. The primary partition key was set to LessonTitle, which is a string. We don't have a sort key right now. We also provisioned five read and write capacity units for this database.

[1:59] If we go ahead and switch to the items section, we will notice that we don't have any items right now, because by default, every DynamoDB table starts completely fresh, there's nothing in it.