我在试着经营一家公司 batch-get-item 从CLI获取一个无法传递超过100个密钥的错误:
batch-get-item
failed to satisfy constraint: Member must have length less than or equal to 100
aws dynamodb batch-get-item \ --request-items file://request-items.json \ --return-consumed-capacity TOTAL > user_table_output.txt
我想知道是否有一种方法可以将分页添加到查询中? 或者是否有其他方法可以运行查询? 我有大约4000把钥匙需要查询。
你必须把钥匙分成不超过100把的几批。另外,请记住,如果返回的项目大小超过16MB,则响应可能不包括您请求的所有项目。如果发生这种情况,响应将包括 UnprocessedKeys ,可用于请求未检索到的密钥。
UnprocessedKeys
BatchGetItem CLI doc here .