Skip to content

Instantly share code, notes, and snippets.

@JenHsuan
Last active December 2, 2025 02:09
Show Gist options
  • Select an option

  • Save JenHsuan/305818f211380976bffab56b1687a109 to your computer and use it in GitHub Desktop.

Select an option

Save JenHsuan/305818f211380976bffab56b1687a109 to your computer and use it in GitHub Desktop.
LSI GSI
Across partitions x o
Key Alternatively Sort key (same Partition key as that of base table) Alternatively Primary key (hash or hash + range) and sort key
Created Time Must be defined at table creation time Can be added/modified after table creation
Read/Write Support Support Eventual consistency/Strongly consistency Only support Eventual consistency
RCU & WCU Use the RCU & WCU of the main table Must provision RCU & WCU for the index
Throttling consideration No special consideration The provisioned WCU for a GSI should be equal or greater than the WCU of the base table
Attribute Projections some or all attributes of the base table some or all attributes of the base table
Limitation Up to 5 LSI per table Up to 20 GSI per table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment