07. Lab - DynamoDB
# DynamoDB
In this hands-on exercise, you will create a NoSQL database in the cloud.
Prerequisites:
- AWS Account
Topics Covered:
By the end of this lab, you will be able to:
- Create a table
- Add data to a table
- Query data in a table
Steps:
- Access the DynamoDB service from AWS Management Console
- On the AWS Management Console page, type "dynamo" in the
Find Servicesbox and then selectDynamoDB. - On the DynamoDB Console, click
Create table. - Enter
Courseas theTable name. - Enter
Namein for thePartition keyand ensureStringis selected.
Note: The partition key spreads data against partitions for scalability. - Keep the remainder of the defaults, and click the “Create” button.
- On the AWS Management Console page, type "dynamo" in the
- Add Data to the Table
- Once the table is created, click on the
Itemstab. - Click
Create item.- In the data entry window, type the following:
- For name, enter,
Course 1and clickSave - Click the
+icon to add additional fields:- Select
Insert - Select
String - For the field name, enter
Teacher - For the value, enter
Kesha Williams - Click
Save
- Select
- For name, enter,
- In the data entry window, type the following:
- Follow the same process to add 5 more documents.
- Once the table is created, click on the
- Query Data in a Table
- In the dropdown that contains
Scan, change it toQuery. - Where it says
Enter value, in the row next to thenamePartition key, enterCourse 1and clickStart Search. - You should see your search results appear in the window.
- In the dropdown that contains
- Cleanup and delete resources
- To clean up the resources to avoid recurring charges, ensure the table name is selected.
- Click on the
Delete tablebutton. - Ensure
Delete all CloudWatch alarms for this tableis selected and clickDelete.
Create a NoSQL database in the cloud using DynamoDB
Task Feedback:
Excellent!