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?
✗ Incorrect
An LSI shares the same partition key as the main table but can have a different sort key.
How many Local Secondary Indexes can you create per DynamoDB table?
✗ Incorrect
You can create up to 5 LSIs per table in DynamoDB.
When can you add a Local Secondary Index to a DynamoDB table?
✗ Incorrect
LSIs must be defined when the table is created; you cannot add them later.
What is the main benefit of using an LSI?
✗ Incorrect
LSIs let you query the same partition key but with a different sort key.
Can you change the sort key of an LSI after the table is created?
✗ Incorrect
The sort key of an LSI is fixed when the table is created and cannot be changed later.
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.