I'm pretty new to AWS DynamoDB and having read the documentation I'm not 100% sure what happens to cost calculations when using the 'Limit' parameter in a SCAN operation.
I understand that one should design the tables so that QUERY operations are predominantly used and that a SCAN will scan the entire table, thus consuming a lot of read capacity. I also understand that a FilterExpression doesn't affect that cost of scanning the entire table, but filters what is returned after the entire scan, and if the total number of scanned items exceeds the maximum data set size limit of 1 MB, the scan stops and results are returned.
What I'm not sure of, is whether the 'Limit' parameter is a type of FilterExpression, or whether it stops an entire scan, thus reducing read costs.
For example, if I had an activity table with a sort key that is a date field (updatedAt) and it had a million rows. If I performed a SCAN with a Limit = 10 (in order to get the very latest 10 activities), I would obviously get back 10 rows but would I be charged for reading a million rows? Cost is my main concern.