How to perform backward pagination in cognito userpool

I am working with nodeJs - AWS lambda function, cognito userpool(AWS).

The requirement is of adding pagination feature, for that I am able to perform forward pagination with the help of, but I am not able to find, what are the necessary steps to perform backward pagination, so that in UI, the users can scroll to previous and next pages without any issues using the endpoint created by me.

Can anyone help me into this?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum