首页 > 解决方案 > dynamodb 查询属性,而不是项目

问题描述

这可能是一个愚蠢的问题,但我是aws的新手,我想做的是使用aws cli查询表中可用的属性。

例如,我有这个:

        "AttributeDefinitions": [
            {
                "AttributeName": "GameConsole",
                "AttributeType": "S"
            },
            {
                "AttributeName": "GameName",
                "AttributeType": "S"
            }
        ],
        "TableName": "Games"   

我想查询的是“GameConsole”和“GameName”

我已经尝试过 aws dynamodb query --select ALL_ATTRIBUTES --table-name Games但似乎没有用,因为它需要一个特定的值来查询项目而不是属性

标签: bashamazon-web-servicesnosqlamazon-dynamodb

解决方案


aws dynamodb describe-table --table-name Games

可能会给你你的桌子的细节。您需要解析以过滤 AttributeDefinitions 或 AttributeName。

来源


推荐阅读