Build an Application Using a NoSQL Key-Value Data Store
GETTING STARTED GUIDE
Follow step-by-step instructions to build an application using a NoSQL key-value data store.
In this tutorial, you will create a bookstore application that showcases a product catalog. Products typically contain unique identifiers and attributes such as descriptions, quantities, locations, and prices. The method for retrieving these types of attributes (specifically, the access pattern) is often a key-value lookup based on the product’s unique identifier. This means that an application can retrieve these other attributes when a product’s unique identifier is provided.
While the product catalog can start off with a few products, it should have the ability to scale to billions if needed without having to be re-architected or requiring a different database. It should also maintain fast, predictable performance at any scale for these key-value lookups. With these requirements in mind, Amazon DynamoDB is a good fit as the durable system of record for the bookstore because it offers low latency performance and scales as your application grows. Another benefit is that you do not need to manage any servers or clusters. You can also check out other purpose-built databases that meet these requirements in AWS Marketplace.
What You Will Learn
- build an application using a NoSQL key-value data store in DynamoDB
- perform basic tasks, such as inserting and retrieving data
- use secondary indexes to enable additional query patterns
- use the DynamoDB API to update attributes of existing items and remove items
Before starting this guide, you will need:
- An AWS account: If you don't already have one, follow the Setting Up Your Environment getting started guide for a quick overview.
- An installed version of the AWS Python SDK via pip install boto3
This tutorial is divided into the following short modules. You must complete each module before moving to the next one.
- Application overview (15 minutes): Learn about the details of the application, and modeling a DynamoDB table to fit the requirements.
- Inserting and retrieving data (15 minutes): We will create the table for our bookstore and insert and retrieve data.
- Querying and global secondary indexes (15 minutes): Learn how to use secondary indexes to enable additional query patterns on your DynamoDB tables.
- Modifying items (15 minutes): Use the API to update attributes of existing items and remove items.
- Cleanup and next steps (10 minutes): Clean up the resources created in this project and learn more.