Amazon's cloud signed deals with Meta and OpenAI during the quarter, helping revenue to exceed consensus.