Local secondary index: Same partition key as primary key (diff. sort key)
Example:
Attributes: CustomerId (partition key) + OrderId (sort key), OrderCreationDt, ProductDetails, OrderStatus
LSI: [CustomerId (partition key) + OrderCreationDt] OR [CustomerId (partition key) + OrderStatus]
Defined at table creation (Modifications NOT allowed)
Global secondary index: Partition and sort key CAN be diff. from primary key
Example:
Attributes: storeCode (Primary Key), city, state, country, address
GSI: state or city or country
Can be added, modified & removed later
Stored separately (Separate RCU and WCU) from the main table
(Recommended) Project fewer attributes to save cost
(Recommended) Avoid throttling on main table - Assign RCU and WCU at least equal to main
table