Indexes
Local Seconday Index (LSI)
This provides an
Alternative Sort Key
for your table, but with same partition key of the base table.This sort key can be a scalar attribute of type
String
,Binary
orNumber
of base table.Can have upto 5 LSI per table.
Must be defined at table creation time.
It may contain some or all attribute from base table.
LSI
uses capacity units of base table.
Global Seconday Index (GSI)
Alternative Primary key from the base table.
This index enables to speed up the queries based on non-key attributes.
Index key consists of scalar attributes from base table of type
Number
,String
orBinary
.Attribute projections can be some or all attributes of the base table.
Must provision
RCU
andWCU
for the index (kind of like a new table).They can be created/modified after table creation.
Throttling
GSI Index
If writes are throttled on GSI, then the main table will be throttled even if there is enough capacity on main table.
LSI Index
No need for special consideration of throttling.
They use
WCU
andRCU
of main table.
Last updated