That's not what Aurora is doing. What you have described is more like "git revert". It's O(num of transcation in the undo log).
Aurora is a log structured db, they can just reset their DB to a particular LSN. i.e. doing "git reset --hard", which's O(1).