0
0
DynamoDBquery~10 mins

LSI vs GSI comparison in DynamoDB - Interactive Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the type of index that shares the same partition key as the base table.

DynamoDB
IndexType = "[1]"  # This index uses the same partition key as the base table
Drag options to blanks, or click blank then click option'
ALocal Secondary Index
BGlobal Secondary Index
CPrimary Index
DComposite Index
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing LSI with GSI, which uses a different partition key.
2fill in blank
medium

Complete the code to specify the index type that can have a different partition key from the base table.

DynamoDB
IndexType = "[1]"  # This index can have a different partition key
Drag options to blanks, or click blank then click option'
ALocal Secondary Index
BPrimary Index
CSecondary Partition Index
DGlobal Secondary Index
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing LSI which requires the same partition key.
3fill in blank
hard

Fix the error in the statement about index capacity mode.

DynamoDB
LSI capacity is [1], while GSI capacity is [2].
Drag options to blanks, or click blank then click option'
Aseparate
Bshared
Cautomatic
Dfixed
Attempts:
3 left
💡 Hint
Common Mistakes
Assuming both LSI and GSI have separate capacity.
4fill in blank
hard

Fill both blanks to complete the statement about index size limits and creation time.

DynamoDB
LSI has a size limit of [1] and must be created [2] the table, while GSI has no size limit and can be created anytime.
Drag options to blanks, or click blank then click option'
A10 GB
B5 GB
Cbefore
Dafter
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up size limits or creation timing between LSI and GSI.
5fill in blank
hard

Fill all three blanks to complete the statement about consistency and query flexibility.

DynamoDB
LSI supports [1] reads and shares the [2] key with the base table, while GSI supports [3] reads and can have a different partition key.
Drag options to blanks, or click blank then click option'
Astrongly consistent
Bpartition
Ceventually consistent
Dsort
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing consistency types or key sharing between LSI and GSI.