Which statement best describes a Local Secondary Index (LSI) in DynamoDB?
easy📝 Conceptual Q1 of 15
AWS - DynamoDB
Which statement best describes a Local Secondary Index (LSI) in DynamoDB?
AAn index that uses the same partition key as the base table but a different sort key.
BAn index that uses a different partition key and sort key from the base table.
CAn index that can be added or removed after table creation.
DAn index that stores data in a separate table outside DynamoDB.
Step-by-Step Solution
Solution:
Step 1: Understand LSI key structure
LSI shares the same partition key as the base table but allows a different sort key for querying.
Step 2: Compare with other options
The option about adding/removing after creation describes GSI; different partition key also describes GSI; separate table is incorrect; the description matching same partition key but different sort key is correct.
Final Answer:
An index that uses the same partition key as the base table but a different sort key. -> Option A
Quick Check:
LSI = Same partition key, different sort key [OK]
Quick Trick:LSI shares partition key, changes sort key only [OK]
Common Mistakes:
MISTAKES
Confusing LSI with GSI key structure
Thinking LSI can have different partition keys
Assuming LSI can be added after table creation
Master "DynamoDB" in AWS
9 interactive learning modes - each teaches the same concept differently