- Alright, now let's run through a demo
of creating a table in Amazon DynamoDB.
You can see we're back here in the AWS Console.
From the Services menu item,
because I've been to DynamoDB before,
you can see that it shows up here in the History.
I could also get to it by going over here
to Database, DynamoDB.
Once we're here, we're seeing this screen
because we don't have any tables in the Ohio region yet.
So I'm gonna go ahead and hit Create table.
I'm gonna call the table "movies".
And if you recall what we talked about with data models,
we need some kind of primary key.
For the data that we're gonna be working with,
we'd want a composite primary key
that is the combination of a partition key and a sort key.
In this particular case, the partition key will be the year
and we will make that a number.
The sort key will be the title,
and we'll leave that as a string.
From here, we could leave the default settings
or we could uncheck that and make some changes here.
You'll see now secondary indexes are something
that we could add to add further indexes of our data.
These secondary indexes need to be added
at the time we create the table.
We could also change the provision capacity.
It defaults to five read and five write capacity units.
So if you expect your table to be a write-heavy table
and not do much reading from it,
then you might say you want 50 write capacity units
but only five reads.
That would be up to you.
It can be difficult to determine that upfront,
so perhaps a good approach is to just make
your best educated guess and leverage monitoring
over a period of time to see if you need to come back
and adjust those capacities.
So for now, I'm just gonna leave these as five and five.
And you can see that at these low capacities,
this table should only cost less than three dollars a month.
I'm gonna go ahead and click Create,
and that table is now being created.
So you can see that DynamoDB makes it really easy
to create tables that are inherently highly available,
durable, fault tolerant.
We know that the data is gonna be replicated.
And based on SSD drives, we know that we're gonna get
predictable, fast performance.
So Amazon Web Services has done a really good job
of creating a very easy NoSQL service with DynamoDB.
So that's it for creating a table in Amazon DynamoDB.