I have a DynamoDB that is indexed by a single numerical key. I'd like to be able to both retrieve items having a specific value of the key, and find its maximum value by querying and requesting a single item in inverse sorting order. When I try to define 2 indices as in the excerpt below on the same key I get the error 'Two keys can not have the same name'.
"KeySchema": [
{
"AttributeName": "logs",
"KeyType": "HASH"
},
{
"AttributeName": "logs",
"KeyType": "RANGE"
}
]