I have one dynamodb table and one record is like belwo:
{
"Items": [
{
"toObjectId": {
"S": "5678"
},
"keyValue": {
"S": "7890"
},
"aTypeId": {
"S": "test"
},
"aws:rep:deleting": {
"BOOL": false
},
"currentAt": {
"N": "1582476260000"
},
"keyTypeId": {
"S": "test2"
},
"aId": {
"S": "1234"
},
"aTypeId_keyTypeId_keyValue_currentAt": {
"S": "test_test2_7890_1582476260000"
},
"fromObjectId": {
"S": "12345"
},
}
],
"Count": 2562,
"ScannedCount": 2562,
"ConsumedCapacity": null
}
How can I write one aws dynamodb scan/query filter with aws cli to just get aTypeId and aId when aTypeId is "test"? And
Primary partition key is aId (String)
Primary sort key is aTypeId_keyTypeId_keyValue_currentAt (String)
I have tried below but no lucky with it
aws dynamodb query \
--table-name test \
--key-condition-expression "aTypeId = :aTypeId" \
--expression-attribute-values '{
":aTypeId": { "S": "test" }
}'