abort amazon when an empty array is returned