Tech stocks have gotten crushed in recent days on a combination of disappointing earnings reports, rising interest rates, and economic fears that pushed the Nasdaq Composite down to five-month lows.

Through Thursday, the Nasdaq was down 3% for the week, and big tech stocks were among the biggest drivers of the sell-off. Alphabet and Meta Platforms both beat estimates in their quarterly reports, but that wasn't enough to please the market as jitters about a recession seemed to be spreading. 

Against that backdrop, investors seemed to have low expectations for Amazon (AMZN 0.75%) coming into its fourth-quarter earnings report. The stock had slid in response to Alphabet's weak cloud growth and Meta's warning about the ad market.

However, Amazon surprised to the upside with revenue rising 13% to $143.1 billion, ahead of estimates at $141.6 billion, and earnings per share jumped from $0.28 to $0.94. The stock finished the after-hours session up 5% on Thursday.

Let's go beyond the headline numbers and look at three reasons why Amazon was able to buck the broader trend in tech stocks.

An Amazon Prime van outside a warehouse.

Image source: Amazon.

1. The e-commerce business is gaining leverage

One of the brilliant parts of Amazon's business model is that it built a huge e-commerce business that had the scale and convenience with free delivery to create a wide economic moat. 

However, the first-party online retail business was never very profitable because direct e-commerce is price-competitive and expensive. Amazon has taken its lead in e-commerce and built high-margin businesses on top of it, and that strategy was on display in the third quarter as its fastest-growing businesses were high-margin e-commerce segments.

While its first-party retail business grew just 7% in the quarter to $57.3 billion, revenue from its third-party marketplace rose 20% to $34.3 billion, ad revenue increased 26% to $12.1 billion, and subscription services, which is mostly Prime revenue, rose 14% to $10.2 billion.

Those made up Amazon's three fastest-growing business lines in the quarter, and help explain why operating income jumped from $2.5 billion to $11.2 billion. Meanwhile, the balance of the company's revenue continues to shift from products to higher-margin services, which made up 56% of revenue in the quarter.

2. The cloud business is coming back

Revenue growth at Amazon Web Services (AWS) has slowed significantly in recent quarters, and came in at just 12% in the third quarter, matching its growth rate in the second quarter.  

CEO Andy Jassy acknowledged that the cloud business saw elevated cost optimization from customers, but said that momentum at AWS is starting to shift toward growth again. He explained, "We're seeing the pace and volume of closed deals pick up, and we're encouraged by the strong last couple of months of new deals signed." Deal signing in September to start in October was larger than all of Q3.

That commentary seemed to be enough to persuade investors that growth at AWS would accelerate, which is key because AWS generates the majority of the company's profits with $7 billion in operating income in the third quarter.

Jassy also talked up the impact of generative AI on cloud growth, saying a substantial and growing number of companies are using generative AI apps in AWS.

3. Costs are under control

Since taking over Amazon in 2021, Jassy's major efforts have been focused on bringing costs under control and growing the more profitable parts of the business.

The company laid off 27,000 corporate employees over the last year and has shuttered several new business lines. Now, the impact of those efforts is clearly visible in the income statement. 

Spending on sales and marketing and general and administrative actually fell in the third quarter from a year ago. Cost of sales, its biggest line item expense, rose just 6.7% to $75 billion, roughly half the pace of its revenue growth. Amazon's employee count was also down 3% from the quarter a year ago to 1.5 million, showing it's reduced its workforce beyond the corporate layoffs.

The company still has the potential to be much more profitable than it is, and that's part of the reason why the stock has consistently earned a high multiple even as revenue growth has moderated since the pandemic.

If Amazon can keep executing on Jassy's plans of controlling costs while growing its high-margin businesses, the stock should keep moving higher.