Local Secondary Index

Learn more about the local secondary index.

We'll cover the following

Use case

Almost everything we do with a LSI can also be done with a GSI. However, there is one thing that LSI provides one thing over GSI that makes it a better option in some cases. It provides strongly consistent reads. Thus, a local secondary index will be our best bet we wish to query our table on non-primary-key attributes and if we want strong consistency.

It also makes sense, though, to only use LSIs when the use case demands strong consistency.

Get hands-on with 1200+ tech skills courses.