dynamoDB LSI Flashcards
What are the restrictions on creating a Local Secondary Index (LSI) in DynamoDB?
You can only create an LSI during the creation of a table.
What is the key characteristic of an LSI in terms of its partition key?
An LSI always maintains the same partition key as the base table but has a different sort key.
How is an LSI created in DynamoDB?
When creating an LSI, you only need to provide the sort key and any attributes you’d like to project.
Is it possible to create an LSI on an existing table in DynamoDB?
No, creating an LSI on an existing table is not possible.
What capacity units are used by LSIs?
LSIs use capacity units from the base table.
What types of reads can you choose for LSIs?
You can choose strongly consistent or eventually consistent reads for LSIs.
What happens if you query an attribute not projected from the base table in an LSI?
DynamoDB will fetch this attribute from the base table, which is costly and should be avoided.