Does DynamoDb allows duplicate sortKey in Global Secondary Index and Local Secondary Index.
I have a table with partitionkey and sortKey and want to introduce GSI and LSI with different sortKey attribute, can this attribute have duplicates?
Yes...
GSI
In a DynamoDB table, each key value must be unique. However, the key values in a global secondary index do not need to be unique.
LSI
In a DynamoDB table, the combined partition key value and sort key value for each item must be unique. However, in a local secondary index, the sort key value does not need to be unique for a given partition key value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With