I have an object in a table like the following
{
key: "apple",
owners: { "Adam": "some info",
"Eve": "some info",
"Samuel": "some info"}
}
I want to be able to fetch the first five owners of the item with the key "apple".
I've tried everything but the maximum I can do is fetch the entire owners map from the item with the given key from DynamoDB then take the first five.
Now with time if the owners map contains a million or more owners I will need a lot of read units to complete the fetch for just the top five owners which I am trying to avoid.
Any help on the above would be appreciated.