Get All Items from DynamoDB with the AWS CLI

There is no "select all" in DynamoDB — reading a whole table means a paginated Scan. The good news: the AWS CLI auto-paginates, making as many 1 MB service calls as needed behind the scenes and printing one combined result.

Code

aws dynamodb scan --table-name 'Music'

The combined output holds every item in the table:

{
    "Items": [
        {"Artist": {"S": "Arturo Sandoval"}, "SongTitle": {"S": "Cubano Chant"}, ...}
    ],
    "Count": 1287,
    "ScannedCount": 1287
}

Explanation

  • Auto-pagination — unlike the SDKs, the CLI follows LastEvaluatedKey for you by default: one command, every item. (--no-paginate limits it to a single service call — the first ~1 MB only.)
  • Chunked output for big tables — the full table lands in memory before printing, so for large tables read it in slices: --max-items 1000 prints 1000 items plus a NextToken; resume with --starting-token <token>. Keep --page-size equal to --max-items to avoid missing/duplicated rows across chunks.
  • Fewer bytes, same bill--projection-expression 'Artist, SongTitle' (with --expression-attribute-names for reserved words) returns only those attributes, but a scan still bills every byte of every item read.
  • Faster on big tables: parallel scan — run N copies with --segment i --total-segments N, each auto-paginating its own slice. Same total cost, much lower wall-clock time.
  • Filtering while you're at it? --filter-expression drops items after they're read (and billed) — see Scan with a filter. Piping to jq? Add --output json and remember the values are DynamoDB JSON.

Do it visually

Eyeballing a table doesn't need a terminal full of DynamoDB JSON: download DynoTable to browse any table in a paginated grid — it pages through scans for you. And before you scan-and-pay, the DynamoDB pricing calculator shows what a full read of your table actually costs.

References

Last verified 2026-07-13 against the official AWS documentation linked above.

Build this request visually

Compose this operation in the free DynamoDB Query Builder — key condition, filter, index, Limit, sort order, and a pagination loop — and copy it back as a runnable SDK v3, CLI, or boto3 program.

Open the DynamoDB Query Builder

Work with DynamoDB without the Console

DynoTable is a fast desktop client for DynamoDB — browse tables, run SQL-style queries, and edit items locally.