Scanning tables
A scan operation evaluates each and every item in the table. Usually, it retrieves every item (with all the attributes along with all the items) of the table. This is the reason why the scan operation is not preferred. It is always recommended that you use query whenever possible. However, it is possible for us to retrieve only specific attributes using the AttributesToGet parameter, similar to the way we saw with query. Additionally, we can filter the number of items retrieved by the scan using the scan filter condition. For instance, if we assume that there are 100 items available in the table, and if the scan filter filters out 10 items using strong consistent read (which consumes a maximum of 1 KB capacity units per item), ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access