We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

Shubham Kumar • 3 years ago

do we have to unmarshall the data like we do while using GSI ?

Alex D • 3 years ago

Yep! The data format you get from DynamoDB will be the same regardless of whether it's from the main table, an LSI, or a GSI.

Jesho • 5 years ago

Hi, maybe this is a dumb question- can I have (hash + range combination ) duplicates in an LSI?

Alex D • 5 years ago

It's not a dumb question at all, Jesho ! You can have items that have the same hash + range values in your secondary indexes. It's only in the primary key of the base table that it must be unique.

Jesho • 5 years ago

Thanks Alex . That made my day. Was struggling to find an clear answer on that in the internet.

One other question is there any way to updateitem based on hash( partition key) only even though my primary key is combination of hash and range ( sort key ) ?

Jesho • 5 years ago

Got it 👍

Alex D • 5 years ago

You're welcome!

For the second question, you cannot do an update by partially identifying an item (e.g. Update all items where partition key = X). All single-item actions (and thus all write operations) must provide the full primary key of the item on which you are operating.

Can Rau • 5 years ago

Hey thanks for this nice website, the link to the GSI page in

Must be specified at table creation. You cannot add a local secondary index to an existing table. It must be provided at creation. This is different than global secondary indexes.


is broken as it's relative to the current page.

Alex D • 5 years ago

Hey Can Rau , yea it's something finicky with my static-site generator. It's supposed to strip trailing slashes but sometimes doesn't, especially if you come from google. As a result, it sometimes screws up the internal linking :(

Can Rau • 5 years ago

Urgh gotcha, crazy slash mess 🙈