Uncovering and explaining how our digital world is changing — and changing us.

Amazon — yes, Amazon — is on a profits streak.

The company with the long-time reputation on Wall Street as a money-loser just revealed a record-setting quarterly profit for the third straight quarter. Amazon said it earned $857 million, or $1.78 a share, in the second quarter on $30.4 billion in revenue, surpassing analyst estimates of earnings per share of $1.11 on $29.5 billion in revenue.

The e-commerce behemoth now has recorded a quarterly profit for five quarters in a row.

For the longest time, Jeff Bezos’s view has been that it’s much smarter to invest leftover cash into building out existing businesses and growing new ones, rather than letting the money fall to the bottom line in the form of net income. That philosophy has typically manifested itself in a bottom-line number that is generally close to breakeven — some quarters a bit of a loss and some quarters a bit of a profit.

But the current streak perhaps indicates an inflection point where Amazon — despite its rapid rollout of new initiatives — can’t even spend all of the money it is taking in.

In a call with reporters, Amazon’s Chief Financial Officer Brian Olsavsky said the trend shouldn’t be seen as a sign that Amazon has run out of new projects to pour money into. He cited plans to double spending on video content in the second half of year and open up 18 new warehouses as proof that the company is still spending aggressively.

Instead, he said the profit trend is partly a result of “working very hard on efficiency” — that is, cutting costs through methods like software automation — as well as the “benefits of operating at scale.”

Amazon’s AWS unit — which sells data storage and computing power to internet companies big and small — grew 58 percent in the quarter to nearly $2.9 billion in revenue.

The unit is both its fastest-growing and most-profitable; it accounted for 56 percent of Amazon’s operating income in the quarter. But it is growing slower than it once did. Its 58 percent growth rate in the second quarter compares to 64 percent year-over-year growth in the first quarter, and 69 percent in the fourth quarter.