Amazon.com Inc. on Thursday delivered its most profitable quarter ever, topping last year’s record holiday period, thanks to surging sales from its lucrative cloud-computing business.

Despite a persistent reputation as a profit miser, Amazon turned in its fourth straight moneymaking quarter and expanded margins in its core retail business, as well as the Amazon Web Services division that rents computing power to other companies.

...