CloudArcade

Hands-on emulator lab · 6–10 min

Find orders a second way — DynamoDB and Secondary indexes

Create a second lookup path and query an order by customer.

These actions use an isolated AWS Emulator. It stores API state locally; it does not create paid cloud resources or run the full hosted AWS service.

Your goal

Create a second lookup path and query an order by customer.

Why this matters

A shop may know a customer’s label but not an order ID. A secondary index gives the data another lookup path. You will save an order and query that path yourself.

Words you will use

An index is another way to look up records. A global secondary index can use a different key from the main table. A projection selects which fields the index holds.

How to proceed

Start a fresh emulator, read each numbered step, and enter the practice settings shown. Run the action, inspect its API receipt, then continue. Finish lab checks the emulator state again before saving your progress.

Start this hands-on lab

1. Create the table and its index

The main table uses order id as its key. Create a global secondary index called by-customer so the same data can be queried using a customer value.

2. Save an order for your customer

Enter a practice customer label. Save order-1 with that label so the index has a value to look up. Use an invented name, not a real customer’s details.

Customer label: Use a short practice value. Do not enter real secrets or personal information. Suggested practice value: team-moon.

3. Query the customer index

Query by-customer using your label, then inspect the returned order. Global secondary indexes use eventually consistent reads, so a real system must allow for update delay.

Practice, then check your understanding

Perform the actions yourself and inspect the returned state. Errors keep your settings so you can retry. Starting another lab clears the previous live environment. Earned XP is kept, and signed-in achievements sync to your account. Replay does not award duplicate XP.

Read the official AWS documentation for service behavior and production details.

Continue with another AWS learning guide