Creating Amazon DynamoDB Table with Both Partition and Sort Keys | Scribe

Creating Amazon DynamoDB Table with Both Partition and Sort Keys

  • Hafeez Baig |
  • 18 steps |
  • 2 minutes
  • Amazon Web ServicesAmazon Web Services
information ordinal icon
Refer to the following guide to learn how to use IAM in the cloud\ <https://scribehow.com/shared/Creating_an_IAM_User_and_User_Group_in_AWS_Management_Console__hWNiiXlcRJKFqYZZEJD-cg>
1
Sign in to **AWS Management Console** as an **IAM User** **Pre-requisite** - Ensure you have selected the AWS region closest to your location\ For this guide, we will be using us-east-2 (Ohio) as a preferred choice
2
Type **DynamoDB** in the search bar and click on **DynamoDB** to view the **DynamoDB** page
information ordinal icon
**What is DynamoDB in AWS?** DynamoDB is a fully managed NoSQL database service provided by AWS. It offers fast and flexible document and key-value data storage, with automatic scaling, high availability, and low latency. DynamoDB is designed to handle large-scale applications with high throughput and low latency requirements.
3
On the **Dynamo DB Dashboard**, click on the **Tables** from the left bar
information ordinal icon
**What are Tables in DynamoDB?** In DynamoDB, tables are the primary data storage entities where data is organized and stored. Each table consists of multiple items, which are analogous to rows in a traditional database, and each item contains attributes, similar to columns.
4
**Tables** wizard will open, click on the **Create table** button on the right side
5
**Create table** wizard will open, enter **Table name** as"**todo2**"
6
Scroll to the **Partition key** section, type "**user**" for the **Partition key** and type "**id**" for **Sort key**
7
Scroll to the **Table settings** section and select the opion **Default settings**
8
Scroll the page and click on the **Create table** button
9
The todo2 table was created successfully
information ordinal icon
Congratulations on successfully creating a table in Amazon DynamoDB! Great job!
10
To query the items in the table, click on the **Explore items** from the left bar
11
**Explore items** wizard will open, select the option **todo2** which we have created earlier
12
**todo2** wizard will open, click on the **Scan or query items** option
information ordinal icon
For the items in the Table Refer to this guide to learn how to create and add items in the DynamoDB Table<https://scribehow.com/shared/Exploring_Amazon_DynamoDB_Tables__BN34sTuvRG-hiypEyZr7sg>
13
Select the **Query** radio button and select the option **todo2** from the dropdown
14
Scroll to the **user (partition key)** section, type "**Ranga**" for the **user (Partition key)** and click on the **Run** button to run the query **Note**: These items have already been added to the table
15
Scroll to the **Items returned** section to view the items returned and it will display the user items of "**Ranga**"