SEATTLE — For most of its life, Amazon sacrificed profits if it could build another few warehouses to ship orders to customers more quickly or find some other investment to fuel its growth.
Now, it cannot avoid showing big profits thanks to the lucrative cloud computing business in which it has improbably become a leader.
On Thursday, Amazon reported net income of $857 million in its most recent quarter, the third quarter in a row in which it has shown a record profit. Its net income for those three months was also more than nine times the amount for the same period last year.
A big part of what has made Amazon’s story as a company so captivating to investors is the single-minded focus of Jeffrey P. Bezos, the company’s founder and chief executive, on making big long-term investments. Unlike Google and Facebook, which have highly profitable advertising businesses, Amazon’s retail business has operated on thin profit margins that quickly vanish when the company begins spending heavily, pushing it into the red.
What is most striking about its recent habit of showing profits is that Amazon has not suddenly become stingy about making investments. In a conference call, Amazon’s chief financial officer, Brian Olsavsky, said that the company would open 18 new fulfillment centers — the warehouses from which it processes customer orders — in the third quarter of this year, three times the number it opened in the same period last year.
Amazon plans to nearly double its spending on digital video during the second half of the year as it expands the offerings of its Netflix-like streaming service, he said. That spending increase reflects a nearly tripling in the number of original television shows and movies financed by Amazon.
“I would not take our financial results as an indication we’re running out of investment opportunities,” Mr. Olsavsky said.
For the second quarter, which ended June 30, Amazon reported net income of $857 million, or $1.78 a share, up from $92 million, or 19 cents a share, a year ago.
Revenue jumped 31 percent to $30.4 billion from $23.19 billion a year ago. The results were well above the average estimate of analysts surveyed by Thomson Reuters of $1.11 a share in earnings and $29.55 billion in revenue.
“They’re starting to really prove out their profitability,” said Mark Mahaney, an analyst at RBC Capital Markets.
Amazon’s shares rose more than 2 percent in after-hours trading after the release of its results.
The company reported operating income of $718 million from its Amazon Web Services business, up from $305 million a year ago. That is slightly more than the profit it showed from its North American retail business.
The North American retail business, though, brought in $17.67 billion in revenue compared with $2.89 billion for Amazon Web Services, an indication of the significantly higher profit margins in cloud computing.
Amazon first began renting access to computers and software in its data centers over a decade ago. While it was dismissed by many for straying from its focus on electronic retailing, it is now the leader in cloud computing, ahead of companies like Microsoft and Google.
Still, the retail business that Amazon is best known for is growing at a torrid pace even though it is now more than two decades old. The company’s North American retail revenue jumped 28 percent as it continued to benefit from a shift in consumer spending to online from offline stores.
The company’s spending on new warehouses and delivery services has played an important role in helping it gobble up a bigger portion of the money people spend on consumer goods.
“They are defying the laws of gravity,” said Gene Munster, an analyst at Piper Jaffray. “It shows their level of market share gains is increasing.”
An article on Friday about Amazon’s quarterly earnings misstated the number of consecutive quarters in which Amazon has shown a record profit. It is three, not two.