diff --git a/moto/dynamodb2/responses.py b/moto/dynamodb2/responses.py index 9c960ef48..8f90e8b04 100644 --- a/moto/dynamodb2/responses.py +++ b/moto/dynamodb2/responses.py @@ -243,6 +243,10 @@ class DynamoHandler(BaseResponse): if limit: items = items[:limit] + reversed = self.body.get("ScanIndexForward") + if reversed != False: + items.reverse() + result = { "Count": len(items), "Items": [item.attrs for item in items],