CloudArcade

Hands-on emulator lab · 6–10 min

Find one player’s score — DynamoDB

Save a player’s score and retrieve it by the player’s lasting ID.

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

Save a player’s score and retrieve it by the player’s lasting ID.

Why this matters

A good key is like a locker number: it leads straight to one record. You will give player-1 a score and retrieve that exact record. This shows why a lasting ID is more useful than scanning every player.

Words you will use

A table holds records. An item is one record. A primary key is the value that tells one item apart from the others.

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 a table with a lasting key

Create a table whose partition key is id. A key identifies the record to read. This lab uses player-1 as a stable identity rather than a display name that may change.

2. Write a score

Enter a score and save it on the player-1 record. The request contains both the key and the score. Look at the API receipt to see how DynamoDB represents numbers.

Player score: Choose a whole number from 1 to 999. You will read this exact value back. Suggested practice value: 42.

3. Read that player’s record

Ask for player-1 directly with a consistent read. Compare the returned score with your input. You did not need to scan every player to find this record.

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