I have a DynamoDB table that holds items with the following structure:
{
"applicationName": { //PARTITION KEY
"S": "FOO_APP"
},
"requestId": { // SORT KEY
"S": "zzz/yyy/xxx/58C28B6"
},
"creationTime": {
"N": "1636332219136"
},
"requestStatus": {
"S": "DENIED"
},
"resolver": {
"S": "SOMEONE"
}
}
In DynamoDB, can I query this table to List all items that match the provided values for applicationName, requestStatus and, resolver?
In other words, how can I list all items that match:
- applicationName = 'FOO',
- requestStatus = 'DENIED', and
- resolver = 'SOMEONE'
With this table design, do I need GSIs? Can I do a Query or would it be a Scan?
What is the most cost-effective, efficient way of accomplishing this task?
I'm using Java's DynamoDBMapper.