I have a pre-existing dynamo db table to which i want to add a primary sort key. All the items in the table contain the key which i want to delegate as the primary sort key.
I have a pre-existing dynamo db table to which i want to add a primary sort key. All the items in the table contain the key which i want to delegate as the primary sort key.
DynamoDB doesn't allow to add Sort key for the existing table.
It allows the following once the table is created.
Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given table.
Solution:-
Please create a new table with redefined key attributes and copy the data from old table to new table.