0
0
DynamoDBquery~5 mins

Local Secondary Index (LSI) concept in DynamoDB - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a Local Secondary Index (LSI) in DynamoDB?
An LSI is an index that uses the same partition key as the main table but allows a different sort key. It helps to query data in different ways without duplicating the partition key.
Click to reveal answer
intermediate
How does an LSI differ from a Global Secondary Index (GSI)?
An LSI shares the same partition key as the main table but has a different sort key. A GSI can have a different partition key and sort key from the main table.
Click to reveal answer
intermediate
What is a key limitation of Local Secondary Indexes in DynamoDB?
You can only create up to 5 LSIs per table, and they must be defined when the table is created. You cannot add LSIs later.
Click to reveal answer
beginner
Why would you use an LSI instead of just querying the main table?
LSIs let you query the same partition key but sort the data differently, which helps when you want to find items based on different sort criteria without scanning the whole table.
Click to reveal answer
beginner
Can you update the sort key attribute of an LSI after table creation?
No, the sort key for an LSI is fixed at table creation and cannot be changed later.
Click to reveal answer
What key does a Local Secondary Index share with the main DynamoDB table?
APartition key
BSort key
CBoth partition and sort key
DNeither partition nor sort key
How many Local Secondary Indexes can you create per DynamoDB table?
A5
BUnlimited
C10
D1
When can you add a Local Secondary Index to a DynamoDB table?
AOnly after table creation
BAt any time
COnly during table creation
DNever
What is the main benefit of using an LSI?
AAllows querying with a different partition key
BIncreases table storage capacity
CImproves write speed
DAllows querying with a different sort key on the same partition key
Can you change the sort key of an LSI after the table is created?
AOnly with a table update
BNo, it is fixed at creation
CYes, anytime
DOnly if the table is empty
Explain what a Local Secondary Index (LSI) is and how it helps in querying DynamoDB tables.
Think about how you can sort the same group of items differently.
You got /4 concepts.
    Describe the main differences between a Local Secondary Index (LSI) and a Global Secondary Index (GSI) in DynamoDB.
    Focus on keys and creation timing.
    You got /4 concepts.