Recall & Review
beginner
What does LSI stand for in DynamoDB?
LSI stands for Local Secondary Index. It is an index that uses the same partition key as the base table but allows a different sort key.
Click to reveal answer
beginner
What does GSI stand for in DynamoDB?
GSI stands for Global Secondary Index. It allows you to create an index with a different partition key and sort key from the base table.
Click to reveal answer
intermediate
Can you add an LSI after creating a DynamoDB table?
No, LSIs must be defined when you create the table. You cannot add or remove LSIs later.
Click to reveal answer
intermediate
Can you add a GSI after creating a DynamoDB table?
Yes, GSIs can be added or deleted at any time after the table is created.
Click to reveal answer
intermediate
What is a key difference in data storage between LSI and GSI?
LSI shares the same partition key and storage as the base table, so it does not increase storage cost much. GSI stores data separately and can increase storage costs.
Click to reveal answer
Which index type in DynamoDB allows a different partition key than the base table?
✗ Incorrect
A Global Secondary Index (GSI) can have a different partition key and sort key from the base table.
When can you add a Local Secondary Index (LSI) to a DynamoDB table?
✗ Incorrect
LSIs must be defined when the table is created and cannot be added later.
Which index type shares the same partition key as the base table?
✗ Incorrect
LSI uses the same partition key as the base table but allows a different sort key.
Which index type can increase your storage costs more significantly?
✗ Incorrect
GSI stores data separately from the base table, which can increase storage costs.
Can you delete a Global Secondary Index (GSI) after creating a DynamoDB table?
✗ Incorrect
GSIs can be added or deleted at any time after the table is created.
Explain the main differences between Local Secondary Index (LSI) and Global Secondary Index (GSI) in DynamoDB.
Think about keys, timing of creation, and storage.
You got /5 concepts.
Describe when you would choose to use an LSI versus a GSI in DynamoDB.
Consider query patterns and table design needs.
You got /4 concepts.