dynamoDB GSI Flashcards
What are the characteristics of a Global Secondary Index (GSI) in DynamoDB?
- A GSI can be set up any time
- a DynamoDB table can have up to 20 GSIs.
- It acts as a secondary table with a different partition key and sort key from the base table.
- Only projected attributes are available in a GSI
- writes are made to the base table, then asynchronously replicated to the GSI.
What is the difference between a GSI and the base table in DynamoDB?
A GSI acts as a secondary table with its own partition key and sort key, and only projected attributes are available in a GSI.
How are writes handled in a Global Secondary Index (GSI)?
Writes are not made directly to the GSI; all writes are made to the base table and then asynchronously replicated to the GSI.
What consistency model do Global Secondary Indexes (GSIs) support?
GSIs only support the eventual consistency model.
What is the recommended provisioned write capacity for a GSI to avoid throttling?
To avoid potential throttling, provision equal to or double the write capacity for the GSI compared to the base table’s provisioned write capacity.