Amazon.com's (AMZN - Get Report) margins continues to surge, and -- for now -- its trademark heavy spending growth is being dialed back a bit.

That's helping the e-commerce and cloud giant's shares make fresh highs following its Q2 report, even though the revenue numbers it shared fell a little short of expectations.

After the bell on Thursday, Amazon reported Q2 revenue of $52.89 billion and GAAP EPS of $5.07. Revenue was officially up 39% and grew about 31% after backing out the impact of last August's Whole Foods acquisition, but was slightly below a $53.37 billion consensus. However, EPS, aided by the aforementioned margin and spending trends as well as minimal income tax expenses, blew out a $2.48 consensus.

For Q3, Jeff Bezos's firm expects revenue of $54 billion to $57.5 billion, which is below a $58.1 billion consensus. However, operating income guidance of $1.4 billion to $2.4 billion is above a $1.73 billion consensus at the midpoint.

Shares rose in after-hours trading on Thursday to a new all-time high, and opened Friday up 3.2% to $1,866.40. The stock is now up about 60% on the year.

Here are some takeaways from Amazon's earnings report and call:

1. The Revenue Numbers Aren't as Bad as They Initially Look

The dollar's strengthening over the past three months meant that Amazon's International segment revenue ($14.6 billion in Q2) got less of a boost from currency swings than it did in Q1. In Q1, International revenue grew 21% in constant currency (CC), but 34% in dollars. In Q2, CC growth was still 21%, but dollar-based growth fell to 27%.

Moreover, Amazon forecasts that in Q3, forex will actually serve as a 0.3 percentage-point headwind to total revenue growth. The full impact of the dollar's rally likely wasn't baked into Q2 and Q3 consensus estimates.

2. Spending Growth Slowed Meaningfully

Though Amazon is still investing aggressively in many fields, spending growth rates slowed relative to Q1, and that helped the company trounce EPS estimates. Fulfillment spend (up 66% in Q1) rose 54% annually to $5.16 billion. Marketing spend (up 41% in Q1) rose 30% to $2.23 billion. Tech/content spend (up 40% in Q1) rose 31% to $5.55 billion. And G&A spend (up 34% in Q1) rose 27% to $1.11 billion.

And with the qualifier that it tends to fluctuate a lot from one quarter to the next, capital spending -- depreciation expenses for which are eventually recorded on the income statement -- cooled as well. Direct purchases of property and equipment (driven in large part by warehouse investments) rose 4% to $3.24 billion, after having grown 44% in Q1. Capex related to capital leases (driven by AWS) actually fell 14% to $2.34 billion. That last number makes for quite the contrast with Alphabet/Google (GOOGL - Get Report) and Facebook (FB - Get Report) , each of which have been seeing huge capex growth this year.

On the call, CFO Brian Olsavsky noted improved operating efficiencies -- in data centers, warehouses and elsewhere -- are helping restrain spending. He also noted that Amazon's fulfillment capacity growth, which was above 30% in 2016 and 2017, is expected to be lower this year.

3. Amazon Web Services (AWS) Remains a Juggernaut

AWS revenue rose 49% for the second quarter in a row and totaled $6.11 billion, topping a $5.98 billion consensus. In addition, the segment's operating income grew 79% to $1.64 billion. Enterprise adoption of public clouds looks like a runaway freight train right now, and -- though top rivals Microsoft  (MSFT - Get Report) and Google are also seeing strong cloud growth -- AWS remains in a league of its own in terms of its scale, customers, feature set and ecosystem.

Much as Microsoft signaled on its recent earnings call regarding adoption of its Azure cloud platform, Olsavsky indicated customer uptake for more advanced AWS services in fields such as machine learning, IoT and serverless computing, is growing strongly.

Amazon.com, Alphabet, Facebook and Microsoft are holdings in Jim Cramer's Action Alerts PLUS member club. Want to be alerted before Jim Cramer buys or sells AAPL or GOOGL? Learn more now.

4. Other Services Business Are Also Doing Well

Third-party seller services revenue (it covers things like commissions and fulfillment services for Amazon marketplace sales) rose 39% to $9.7 billion. Subscription services revenue (driven by Amazon Prime, and to some extent digital content subscriptions) grew 57% to $3.4 billion. And Amazon's "Other" revenue, which is fueled by ad sales, totaled $2.2 billion.

By contrast, Amazon's online Stores, which cover direct e-commerce sales, grew a moderate 14% to $27.2 billion.

Officially, Other revenue grew 132%. After backing out a $640 million boost from an accounting change, growth was still an impressive 64%. Subscription, and to a lesser extent third-party seller revenue growth, also benefited from accounting changes, while online stores growth was slightly pressured by them. Going forward, Amazon's $20 U.S. Prime price hike should give a lift to subscription revenue.

5. Services Growth Led to Strong Margin Growth

After having risen 2.6 percentage points annually in Q1 to 39.8%, Amazon's gross margin (GM) rose 3.9 points in Q2 to 42.1%. That easily beat a 40.4% consensus, and had a lot to do with a revenue mix shift towards AWS, seller services, subscriptions and ads relative to direct e-commerce sales.

Shipping efficiencies also appear to have played a role; Amazon's shipping costs (boosted by Prime adoption) rose 31% annually, which is down from Q1's 38%. 2018's relatively restrained capital spending may have also had some impact.

6. Amazon's E-Commerce Reporting Segments are Still Growing Well

As indicated earlier, constant currency-based International segment growth held steady in Q2, even if dollar-based growth fell. Meanwhile, Amazon's North American segment revenue totaled $32.2 billion, roughly in line with consensus estimates. After backing out the impact of the Whole Foods deal -- most of the $4.3 billion in "physical stores" revenue that Amazon reported comes from it, and most of that revenue is from North America -- the segment's growth appears to be around 25%, which is close to Q1 levels.

The North American and International segments, it should be noted, cover both direct e-commerce sales and non-AWS services businesses. Thus even as sales growth for the segments isn't changing much on a CC basis, the makeup of each segment's revenue is.

7. Taxes Are Low -- For Now

Though Amazon's pre-tax income rose to $2.61 billion from $666 million a year ago, its provision for income taxes fell to just $74 million from $467 million. That naturally gave earnings a lift.

Separately, when asked about a recent Supreme Court ruling that gave states the go-ahead to collect sales taxes on purchases by locals of items sold online by merchants that have no operations in that state, Olsavsky noted that for now, Amazon is only collecting sales taxes on third-party merchant sales in three states (Washington, Pennsylvania and most recently Oklahoma), compared with 45 states for direct sales.

TheStreet's Eric Jhonsa previously covered Amazon's earnings report and call through a live blog.