0

I have an AppSync API, and there's a requirement to return the data in a randomised order.

This is what I have currently, I have no idea where to start and can't find any docs on this.

{
    "items": $util.toJson($ctx.result.items)
}
Ewan Valentine
  • 3,741
  • 7
  • 43
  • 68

1 Answers1

1

Instead of do a query, you can call DDB scan from the VTL. The scan operation does not guarantee any ordering on the result

Vasileios Lekakis
  • 5,492
  • 2
  • 15
  • 17