ExitAmazon DynamoDB: reading and exporting table data1 / 9
Explanation

Read by key, then follow every page

How to extract DynamoDB data using key-based reads, paginated queries and scans, or point-in-time exports to Amazon S3. · associate

Choose a DynamoDB read operation from the keys you know. GetItem retrieves one item using its complete primary key: the partition key and, when present, the sort key. Query retrieves items with one partition-key value and can narrow them with a sort-key condition. For example, query one customer's orders within a date range when customer ID is the partition key and order date is the sort key.

Scan examines items across a table or index rather than selecting a partition-key value. Use it when no suitable key-based access path exists. A FilterExpression removes results after items have been read; it does not turn a Scan into a targeted Query or avoid the read work for discarded items.

Both Query and Scan can return multiple pages. After processing a response, pass its LastEvaluatedKey as the next request's ExclusiveStartKey, keeping the other request settings the same. Continue until LastEvaluatedKey is absent. A filtered page can contain no matching items and still have a continuation key, so an empty result page is not a stopping signal.

OperationSelectionTypical extraction
GetItemComplete primary keyOne known item
QueryPartition-key equalityRelated items
ScanTable or index traversalBroad inspection

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.