Capstone Project – Part 2

Hi. So today, I will be sharing my experiences in creating DynamoDB tables with server less template. I don’t want to go deep inside the design and configurations of the tables, but I want to share few things that I learnt in the process.

We know that DynamoDB is a NoSQL database. That means, there is no schema or relationship among tables and elements in it. For configuring the database tables with DynamoDB, we just need a single primary key. This primary key is referred as Partition key or Hash key. We use this key to uniquely identify the items. There’s another key called Sort Key or Range key. Sort key is needed when the combination of both the sort key and partition key can uniquely identify an element.

Did you know that you don’t have to give any other attributes other than the keys needed? Just define the attribute names and types, which are keys and specify the type of key in the key schema. That’s it..your resource configuration for DynamoDB tables is complete.

We can also specify secondary indexes. This index lets you query the table using an alternate key, in addition to queries against the primary key and optional secondary keys. They can be either global or local. For global secondary indexes, the specified partition and sort key can be different than what was configured in the tables. For local secondary indexes, the partition key must match with the table, while the sort key can be different.

Hope you learnt few things about DynamoDB. Will meet you with other learning in the next blog. Bubyee!!

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *