I have dynamodb table with GSI as the following:
ParentId#ChildName |
---|
2346#John |
2388#Jerry |
Now I want to add a new time to the table where parentId = 2388 and ChildName = Tom, before adding this item I want to make sure that the GSI doesn't already contains this combination "2388#Tom".
How can I achieve this, I was thinking of using a condition expression on GSI while doing the putItem operation, but I am not sure if dynamo db support condition expression on secondary indexes?
Any help will be highly appreciated.