In a slow-motion race of two retail behemoths, Amazon's trump card was its lucrative cloud-computing business.