Demo: Using A Local Secondary Index

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.

  1. Fetch the score for a player in a particular game.

  2. Fetch the top two players of a game.

This is a possible create table command:

Get hands-on with 1200+ tech skills courses.