Introduction To Amazon DynamoDB
Introduction To Amazon DynamoDB
Lab overview
Amazon DynamoDB is a fast and flexible NoSQL database service for all applications
that need consistent, single-digit millisecond latency at any scale. It is a fully
managed database and supports both document and key-value data models. Its flexible
data model and reliable performance make it a great fit for mobile, web, gaming,
ad-tech, Internet of Things (IoT), and many other applications.
In this lab, you will create a table in DynamoDB to store information about a music
library. You will query the music library and then delete the DynamoDB table.
Topics covered
In this lab, you will:
Troubleshooting tip: If you get an Access Denied error, close the error box, and
choose Start Lab again.
A red circle next to AWS at the upper-left corner of this page indicates the lab
has not been started.
A yellow circle next to AWS at the upper-left corner of this page indicates the
lab is starting.
A green circle next to AWS at the upper-left corner of this page indicates the lab
is ready.
Please wait for the lab to be ready before proceeding.
At the top of these instructions, choose the green circle next to AWS
This option will open the AWS Management Console in a new browser tab. The system
will automatically sign you in.
Tip: If a new browser tab does not open, a banner or icon at the top of your
browser will indicate that your browser is preventing the site from opening pop-up
windows. Choose the banner or icon, and choose Allow pop-ups.
Arrange the AWS Management Console tab so that it displays along side these
instructions. Ideally, you should be able to see both browser tabs at the same time
so that you can follow the lab steps.
In the AWS Management Console, choose the Services menu. Under Database, choose
DynamoDB.
For the Partition key, enter Artist and leave String selected in the dropdown list.
For Sort key - optional, enter Song and leave String selected.
Your table will use the default settings for indexes and provisioned capacity.
The table will be created in less than 1 minute. Wait for the Music table to be
Active before moving on to the next task.
When you write an item to a DynamoDB table, only the partition key and sort key (if
used) are required. Other than these fields, the table does not require a schema.
This means that you can add attributes to one item that may be different than the
attributes for other items.
These are the only required attributes, but you now add additional attributes.
FIELD: Album
VALUE: The Dark Side of the Moon
To add another new attribute, choose Add new attribute.
FIELD: Year
VALUE: 1973
Choose Create item.
There are also faster ways to load data into DynamoDB, such as using AWS Command
Line Interface, programmatically loading data, or using one of the free tools
available on the internet.
Choose Psy.
Change the Year from 2011 to 2012.
A query operation finds items based on the primary key and optionally the sort key.
It is fully indexed, so it runs very fast.
Fields for the Artist (Partition key) and Song (Sort key) are now displayed.
The song quickly appears in the list. You might need to scroll down to see this
result.
A query is the most efficient way to retrieve data from a DynamoDB table.
Alternatively, you can scan for an item. This option involves looking through every
item in a table, so it is less efficient and can take significant time for larger
tables.
34.214.182.31