Jyotsana Nandwani
Jyotsana Nandwani

Reputation: 198

How to see DynamoDB Query result count in AWS management console

i can see total item count in DynamoDB table in Overview tab, but when i query any DynamoDB table, I get results in AWS Management Console, with pagination at top right, but how to see total result count here? I cant just paginate endlessly to see total count if resultset is huge.

Upvotes: 5

Views: 9242

Answers (4)

A-Sharabiani
A-Sharabiani

Reputation: 19329

In the new AWS console you can find it here: DynamoDb > Tables > Click on the table name > See the screenshot below.

enter image description here

Upvotes: 2

Manik Arora
Manik Arora

Reputation: 4792

I also just wanted to see the total number of items in my DynamoDB using AWS Console and I want to share with anyone else coming here for the answer -

  1. Open the DynamoDB for which you want to know the total items count.
  2. Click the "Items" tab to see the list of items in the table, it shows first 100 items.
  3. Click the "Actions" drop-down and hit "Manage live count".

Step 1

  1. A popup will appear with a button to "Start" the count.

Step 2

Upvotes: 1

ubi
ubi

Reputation: 4399

There's no direct way to get the count of items in a DynamoDB table (there's no CLI method that returns count, for example). This is probably by design and therefore there's no way too see the count from the Console as well.

However, you could use SELECT COUNT (similar to in a RDBMS) - this returns the count of records in a query - if you don't supply a FilterExpression this will effectively match all records and therefore give the total count.

COUNT - Returns the number of matching items, rather than the matching items themselves.

Upvotes: 0

F_SO_K
F_SO_K

Reputation: 14799

In your Query you can set ReturnConsumedCapacity, for example

"ReturnConsumedCapacity": "TOTAL"

This will return the number of RCUs consumed in the Query, which is some cases will be the count of the items returned.

Cases where this might not be true are where you are applying a filter to the result set. In this case, the RCUs will represent the pre-filtered set of items, not the number of items returned.

So use it carefully, but in many cases this will work.

EDIT: I just noticed you asked specifically about the console. I don't know a way to do this in the console.

Upvotes: 0

Related Questions