How to get item count from DynamoDB?

前端 未结 12 2317
故里飘歌
故里飘歌 2020-12-04 17:15

I want to know item count with DynamoDB querying.

I can querying for DynamoDB, but I only want to know \'total count of item\'.

For example, \'SELECT COUNT(*

12条回答
  •  一个人的身影
    2020-12-04 18:10

    With the aws dynamodb cli you can get it via scan as follows:

    aws dynamodb scan --table-name  --select "COUNT"
    

    The response will look similar to this:

    {
        "Count": 123,
        "ScannedCount": 123,
        "ConsumedCapacity": null
    }
    

    notice that this information is in real time in contrast to the describe-table api

提交回复
热议问题