我有一个包含这些项目的DynamoDB表:

hash key = nombre_tema sort key = categoria attributes:“nombre_tema”,“contenido”,fecha secondary index:哈希键:categoria,sort key:fecha

使用API网关作为代理我在集成请求中使用以下代码:

{
    "TableName": "Temas",
    "IndexName": "categoria-fecha-index",
    "KeyConditionExpression": "categoria = :v_tema",
    "FilterExpression" : 'createdate between :val1 and :val2',
    "ExpressionAttributeValues": {
        ":v_tema": {"S":  "tema" },
        ":val1" : "2010-01-01",
        ":val2" : "2010-12-31"
    },
    "ProjectionExpression": "nombre_tema, contenido, fecha",
   "ScanIndexForward": false
}

但响应机构是:

{“temas”:[]}

感谢您的关注 .