Object-list pagination
Object-list pagination divides a selected object listing into multiple responses that a client traverses using the interface's continuation rules.
For S3 ListObjectsV2, IsTruncated=true requires continuation with NextContinuationToken as the next request's ContinuationToken. MaxKeys is an upper bound, not a completion signal: inspect IsTruncated even when fewer keys are returned. This opaque token is not an object key; StartAfter is a separate key-based selector. [1]
In a flat CLI v2 list-objects-v2 listing without a delimiter, --page-size controls service-call size, while --max-items caps command output. Resume CLI output with NextToken and --starting-token, not by passing that CLI token directly to another interface. [2]
--no-paginate stops automatic traversal after one service request; --no-cli-pager only disables the output display program. Neither a screenful nor a capped command output establishes complete listing coverage. [3]
Delimiter grouping changes which results represent individual objects; version listings use their own continuation protocol. See object-key-prefix and object-version-id. This definition describes traversal, not checksum verification or a multi-request snapshot guarantee. [1]
Relations
- related
- Object key prefix, Object version ID
Advantages
- Allows clients to traverse listings without requiring one unbounded service response. [1]
Limitations
- Continuation tokens belong to their interface; service and CLI output limits are not interchangeable. [2]
Citations
- Amazon S3 API: ListObjectsV2, continuation and result grouping
- AWS CLI v2: list-objects-v2, output limits and CLI tokens
- AWS CLI v2: service pagination and the client-side pager
Sources & caveats
- CLI behavior refers to AWS CLI v2 documentation, not a live service test.