Editors' pick: Originally published July 29.

Like clockwork, Amazon's (AMZN) - Get Report superior scale in retail and cloud infrastructure, along with the differentiated services it can offer thanks to that scale, continues to drive outsized revenue growth.

But unlike in prior years, Amazon is now at a point where it can remain solidly profitable quarter after quarter, even as it continues prioritizing growth over profitability.

The e-commerce giant easily topped estimates for the second quarter in a row yesterday, with revenue rising 31% annually (an improvement from Q1's 28%) to $30.4 billion and EPS rising to $1.78 from just $0.19 a year ago. It also guided for Q3 revenue of $31 billion-$33.5 billion, favorable at the midpoint to a $31.6 billion consensus and implying 22%-32% growth.

With the help of strong Prime adoption, Amazon's North American division continues rapidly taking e-commerce share from smaller rivals: Its sales rose 28% (slightly improved from Q1's 27%) to $17.7 billion The International division saw revenue rise 30% (better than Q1's 24%) to $9.8 billion, as European sales -- also boosted by Prime uptake -- continued surging and forex went from being a headwind to a tailwind.

Amazon Web Services (AWS) continues growing like wildfire, as the migration of enterprise workloads to the cloud gains momentum. AWS revenue rose 58% (slightly less than Q1's 64%) to $2.9 billion, and should be on a $15 billion per year run rate by early 2017. Though Microsoft, IBM and Google are all working overtime to grow their public cloud businesses, AWS' scale, feature set, software ecosystem and growing enterprise traction still leave it in a league of its own.

What's especially notable about Amazon's last two earnings reports is how the profitability of two of its three reporting segments have hit inflection points: North American and AWS operating income more than doubled annually in Q2 to $702 million and $718 million, respectively. International, held back by the big investments Amazon is making in Europe and India, posted a $135 million operating loss, narrowing from $189 million a year ago. Free cash flow for the last 12 months, excluding lease repayments and assets acquired via capital leases, rose to $2.5 billion from $1.6 billion at the end of Q1.

This improved profitability comes even though Amazon's fulfillment spend rose 35% to $3.9 billion, its marketing spend 34% to $1.5 billion, and its technology/content spend 28% to $3.9 billion. The company also spent close to $3.4 billion -- either directly or via leases -- on property and equipment, and grew its headcount by an eye-popping 47% to 268,900. It also disclosed on its earnings call that it plans to open 18 new fulfillment centers in Q3 (up from 6 a year earlier) and nearly double its content spend in the second half of 2016. Netflix (NFLX) - Get Report can't be happy to hear the latter remark.

Clearly, Amazon's bottom-line improvement isn't the result of Jeff Bezos changing his priorities. Rather, it's due to a mixture of sales growth and the margin gains that have come amid a revenue mix shift away from direct e-commerce sales. Gross margin rose to 36.9% in Q2 from 34.6% a year ago, 30.7% in Q2 2014 and 28.6% in Q2 2013. For comparison, Wal-Mart (WMT) - Get Report had a 24.8% gross margin in its April quarter.

AWS's growth has boosted margins, and so has the rapid growth seen for third-party e-commerce sales, for which Amazon collects steep "referral fees" and often provides high-margin fulfillment and/or advertising services. Third-party sellers accounted for 49% of Amazon's Q2 paid units, up from 45% a year ago and 41% in Q2 2014.

On its call, Amazon pointed to a virtuous cycle between Prime adoption and uptake for its fulfillment platform, Fulfillment by Amazon (FBA): As Prime keeps growing, many sellers are adopting FBA to make their goods Prime-eligible, which in turn boosts Prime's value to consumers.

Accelerated fulfillment and content spending in the second half will put some near-term pressure on Amazon's bottom line -- operating income is expected to be somewhere between $50 million and $650 million in Q3. That, along with big year-to-date gains, are why shares are only up modestly today.

But all the same, Amazon's story has clearly changed. It's no longer about

fully sacrificing

profitability for the sake of e-commerce dominance, but about

limiting

profitability for the sake of becoming an indispensable retail and cloud utility to its millions of customers.