The deal underscores the AI industry’s insatiable appetite for computing power, pushing Amazon shares to an all-time high.