What is the best way to PAGE results from DynamoDB in AWS Lambda to the front end client?

So I’m getting the following error from AWS Lambda:

The Lambda function returned a response that is too long to serialize. The response size limit for a Lambda function is 6MB.: ArgumentException at System.IO.UnmanagedMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)

This code is called from an ADMIN site and it’s trying to load ALL USERS in the system. I need a way to page the results from the server to the client so that I stay under the 6MB limit, yet still be able to pull all records to the client.

What is the best way to implement this functionality?

If AutoQuery DynamoDB is an option the clients have a GetLazy() API that calls multiple AutoQuery Services behind the scenes.

Otherwise you’d have to implement it yourself, have your Service handle custom Take/Skip properties and do the paging on the client.