Demo: Using A Local Secondary Index
Work with a LSI.
We'll cover the following
Creating a LSI
Let’s take an example that requires strong consistency. Imagine a simple game table, FightClubGame
. This table consists of three attributes, namely: GameId
, PlayerId
, and Score
.
GameId | PlayerId | Score |
---|---|---|
“1” | “a” | 150 |
“1” | “b” | 35 |
“1” | “c” | 50 |
“1” | “d” | 45 |
“2” | “d” | 10 |
… | … | … |
Let’s support the following two access patterns.
-
Fetch the score for a player in a particular game.
-
Fetch the top two players of a game.
This is a possible create table command:
Get hands-on with 1400+ tech skills courses.