This lab goes through a process of creating a DynamoDB Table and using a Global Secondary Index to Fetch Data
Services Covered
DynamoDB
Lab description
This lab goes through a process of creating a DynamoDB Table and using a Global Secondary Index to Fetch Data
Learning Objectives
- Create DynamoDB table
- Fetch data using Global Secondary Index
Lab date
17-12-2021
Prerequisites
- AWS account
Lab steps
- Create a DynamoDB Table.
- Once the table is created create an item in that table.
Add two more String attributes: ReturnDate and UserAmount. In JSON format it might look something like that:{ "UserName": { "S": "Dune" }, "OrderId": { "S": "2021-12-17-1349" }, "ReturnDate": { "S": "20211222" }, "UserAmount": { "S": "19.99" } }
Create an item.
- Navigate to the Tables and then Indexes and create new Index. Enter the Partition key as ReturnDate and Sort key as UserAmount
- Add few more items into your table.
- Scan the table using the SGI created in step 3.
Lab files
- []()