For dynamic usecase, DynamoDB has implemented pagination with something called
lastEvaluatedKey -
https://docs.aws.amazon.com/amazondynamodb/latest/developerg...This is different from LIMIT in RDBMS
Wouldn’t this pattern solve the complexity you are talking about?