Wall Street is warming up to Amazon (AMZN -1.44%) stock again. The e-commerce giant's shares are trouncing the 11% returns of the S&P 500 this year after sliding last year amidst investor apprehension. Now that the market seems less fearful of a possible recession on the way, investors have turned excited about Amazon again -- and especially its expanding cloud services segment.

Let's take a look at some important but less appreciated factors about this massive business that make it an attractive stock to consider having in your portfolio.

1. Services growth

Amazon maintains one of the world's largest e-commerce platforms, complete with a fulfillment network that puts most consumers within about a day of delivery of millions of products. This part of the business is going through a tough growth hangover following pandemic-related gains. Product sales were roughly flat in the first quarter at $57 billion.

But Amazon's service segment is even bigger, and it's still growing at an impressive clip. Net service sales -- which include things such as the enterprise cloud services platform, subscriptions like Prime, and seller advertising -- rose 17% last quarter to $70 billion. The core AWS segment is feeling a modest economic pinch, though, too. "What we're seeing is enterprises continuing to be cautious in their spending in this uncertain time," CEO Andy Jassy told investors in late April.

2. Prioritizing cash flow

Amazon's return to profitability dominated headlines this past quarter after it generated a $3.2 billion profit compared to a $3.8 billion loss a year ago. But executives have made it clear that they run the business with an eye toward building long-term cash flow rather than focusing on earnings.

AMZN Cash from Operations (TTM) Chart

AMZN Cash from Operations (TTM) data by YCharts

There have been some huge pressures on this metric in recent quarters, including investments in a bigger delivery infrastructure following pandemic-related demand spikes. However, momentum is turning more positive lately, thanks to cost cuts, rising service sales, and lower freight expenses.

3. The stock is cheap

Because of its famously low annual earnings, Amazon stock always looks expensive when judged by that metric. Investors today have to pay roughly 300 times the past full year's profits to own the stock. Amazon booked net losses in 2022 as well despite having generated over $500 billion of revenue.

The shares seem more attractive on a price-to-sales basis, which helps smooth out the impact of pandemic-related swings in capital investments. Amazon is priced at 2.5 times revenue, above Walmart's P/S ratio of 0.7 but far below Microsoft's ratio of 12.

That valuation can keep expanding as Amazon takes further steps toward boosting profitability. Those cuts aren't endangering aggressive bets in potential game-changing business lines, either. Amazon is excited about how AI could impact cloud services, for example, or the international expansion of its sellers program.

There are factors that growth stock investors won't like about Amazon, such as its weak net profits and its capital-intensive e-commerce segment. On the other hand, its dominant position in enterprise cloud services, along with other attractive niches like consumer tech and digital entertainment, lean in its favor as a long-term investment.

Investors should consider patiently holding this stock while they wait for some of these projects to mature into bigger businesses over the next few years.