By accessing all items in a table or a secondary index, the Scan action returns one or more items and item attributes. A FilterExpression action can be used to tell DynamoDB to return fewer entries. If the total number of scanned items exceeds the 1 MB maximum dataset size limit, the scan is terminated and the results are provided to the user as a LastEvaluatedKey value so that the scan can be resumed later. The number of items beyond the limit is also included in the results. If no table data meets the filter requirements after a scan, the scan will fail. A single Scan operation reads up to the maximum number of items set (if using the Limit option) or a maximum of 1 MB of data, after which any filtering is applied.
You must paginate the result set if LastEvaluatedKey appears in the response. In the Amazon DynamoDB Developer Guide, see Paginating the Results for more information.
Applications can request a parallel Scan operation by giving the Segment and TotalSegments options for quicker performance on a large table or secondary index. See the Amazon DynamoDB Developer Guide's Parallel Scan for more information.
When reading data in a table, Scan utilises eventually consistent reads; as a result, the return set may not include changes to the table data that occurred before the operation began. Set the ConsistentRead parameter to true if you need a consistent copy of the data when the Scan starts.