Database Reference
In-Depth Information
Pagination
As we discussed earlier, DynamoDB puts a size limit of 1 MB on the result set of query
and scan operations. So, sometimes it's quite possible that the result set would have a data-
set of more than 1 MB. In order to deal with this limitation, DynamoDB provides us with
two useful parameters,
LastEvaluatedKey
and
ExclusiveStartKey
, which allow
us to fetch results in pages. If a query or scan result reaches the maximum size limit of 1
MB, then you can put the next query by setting
ExclusiveStartKey
derived from
LastEvaluatedKey
. When DynamoDB reaches the end of search results, it puts
LastEvaluatedKey
as null.