Reputation: 149
i am trying to create a local secondary index via the management console. After selecting the desired table in DynamoDB, I choose the "index" tab and click "Create Index". Then I am prompted with the following UI. I cannot state, if the index should be local or global. AWS does not automatically check, wheter the index partition key equals the table partition key. Even when it is the same partition key, AWS specifies the Index as "GSI" instead of "LSI". I can configure a local secondary index via the cli correctly - this works perfectly fine.
I was just wondering, can you actually do this right in the management console?
Upvotes: 4
Views: 6091
Reputation: 1048
If you would like to know how to add an LSI at creation time in the management console, please see below.
But it is very simple. When on the create table page in the console, in the Table settings
click Customize settings
. Then you just need to scroll down the page past the Read/write capacity settings
section.
The next section will be the Secondary indexes
section. From here you can create secondary indexes.
Upvotes: -1
Reputation: 35156
You cannot create on an existing DynamoDB table, from the AWS documentation:
To create one or more local secondary indexes on a table, use the LocalSecondaryIndexes parameter of the CreateTable operation. Local secondary indexes on a table are created when the table is created. When you delete a table, any local secondary indexes on that table are also deleted.
You would need to either use a global secondary index, or migrate to a new table that you create the LSI at create time.
Upvotes: 10