Is it possible to add a new Local Secondary Index to an existing DynamoDB table?
1 Answer
no, you cant do it, only adding global secondary index is possible to an existing table.
from documentation:
Local secondary indexes on a table are created when the table is created.
6 Comments
Eyal Ch
@kashyapjimuliya like how? do you have an example? you can always add/delete global secondary indexes
Like example, I have created two tables and for each there is LSI but when I want to add some new column to one of the tables and I want to make it as LSI for third table to have a One-to-One or One-to-Many relation. What I need to know is how is that scenario going to play out?
Eyal Ch
@kashyapjimuliya you can always add later secondary global index
Yusuf
but I want to use the same partition key for GSI as of table partition key. for this reason i needed LSI, since LSI is not possible, can i create GSI as such with same partition key
|