WEBVTT

00:00.960 --> 00:07.080
In this demo, we will create a DynamoDb table
using the AWS Management Console.

00:07.760 --> 00:12.360
To get to DynamoDb,
click on the services tab on the top left corner,

00:13.140 --> 00:16.920
and under databases, click on DynamoDb.

00:17.920 --> 00:21.100
Once you're here, click on
the create table button,

00:21.900 --> 00:26.160
and to create a DynamoDb table,
we have to first provide a table name.

00:27.080 --> 00:32.100
Let's create a table containing information
about employees of an organization.

00:33.060 --> 00:36.040
Let's name the table employee_data.

00:36.560 --> 00:40.620
We're also expected to provide
a primary key or a hash key,

00:40.840 --> 00:45.040
so let's use the employee ID
as the primary key in this example.

00:45.600 --> 00:47.660
This can be of type number.

00:51.100 --> 00:54.000
Let's leave all the other settings to default.

00:54.400 --> 00:56.880
When ready, click on the create button.

00:58.120 --> 01:02.640
This can take a couple of seconds,
so wait until the table has been created.

01:03.860 --> 01:08.280
Once the table has been created,
you will be able to see the table name on the left.

01:08.940 --> 01:14.260
If we click on the items tab, you'll see that
there are no items added to this table yet.

01:15.480 --> 01:19.820
Let's do that now, let's create some items
which can be added to this table.

01:21.140 --> 01:23.700
Once we click on the create item tab,

01:23.700 --> 01:28.260
you'll see that the employee ID,
which is the primary key is already populated.

01:28.740 --> 01:31.780
To this, let's add a number of 1.

01:32.840 --> 01:37.680
To add more attributes to this table,
let's click on the append button.

01:38.900 --> 01:43.060
Let's add a name of an employee
which can be of type string.

01:48.060 --> 01:52.480
Next, let's add age. This can be of type number.

01:55.560 --> 02:06.200
Let's also add the role,
which can be of type string, then click on save.

02:07.340 --> 02:11.260
Here we have an item with an employee ID of 1,

02:11.440 --> 02:15.920
the name is Lucy, age is 42
and the role is team lead.

02:16.360 --> 02:19.040
Similarly, let's add some more items.

02:36.740 --> 02:41.740
Now let's add the third item,
which is for the user called Lee.

02:50.960 --> 02:53.640
We now have a table with three items.

02:53.800 --> 02:58.600
When we add items, only the primary key,
which is the employee ID in this example,

02:58.600 --> 02:59.760
is mandatory.

02:59.760 --> 03:01.400
The rest are optional.

03:01.880 --> 03:05.720
This can be seen for the item
that we created for the user called Lee.

03:05.940 --> 03:08.680
We did not specify the age for this item.

03:09.120 --> 03:12.960
Finally, we can search for items
in this table using filters.

03:14.500 --> 03:19.160
For example, to list all users
who are developers, add a filter like this.

03:21.760 --> 03:23.380
That's it for this demo.

03:23.380 --> 03:28.660
In the upcoming lecture, we'll see how to create
dynamoDb tables using terraform.

