Local Secondary Index (LSI)

  • Alternative Sort Key for your table (same Partition Key as that of base table)
  • The Sort Key consists of one scalar attribute (String, Number, or Binary)
  • Up to 5 Local Secondary Indexes per table
  • Must be defined at table creation time

Global Secondary Index (GSI)

  • Alternative Primary Key (HASH or HASH+RANGE) from the base table
  • Speed up queries on non-key attributes
  • The Index Key consists of scalar attributes (String, Number, or Binary)
  • Attribute Projections - some or all the attributes of the base table (KEYS_ONLY, INCLUDE, ALL)
  • Must provision RCUs & WCUs for the index
  • Can be added/modified after table creation