Sometimes, the best stock buys are hiding in plain sight. Microsoft shares, for example, gained 1,000% in the past decade, even though the company was already an entrenched software leader back in 2014. It relied on competitive advantages, like its economies of scale and valuable brand, to reach today's massive $3 trillion market capitalization -- likely creating many millionaire shareholders along the way.

Amazon's (AMZN -0.09%) business could follow a similar path. The company has a long growth runway ahead in core sales divisions like e-commerce and cloud services. Profit margins appear likely to rise significantly over the next decade, as well. Let's look at how these factors might make the stock a screaming-buy opportunity today.

Diverse sales gains

Owning Amazon gives you exposure to two massive global growth niches: e-commerce and cloud enterprise services. The retailing segment is the less exciting of the two but is performing well. It recently set a holiday season sales record on accelerating growth.

Amazon is still improving on this established platform, so there's room to keep boosting sales and profits as its Prime membership fees rise. Executives said in a recent conference call with analysts that they reduced average delivery time in Q4, even as they cut costs. "What we're most pleased with is the continued invention and customer experience improvements across our business," said CEO Andy Jassy in early February.

The improvements were more obvious in the cloud services segment, which is expanding at a healthy double-digit rate right now. Growth has accelerated over the last few months, and management believes this lift will carry into 2024.

That's because companies aren't delaying their cloud migrations as they were in early 2023. As a result, Wall Street pros are expecting Amazon's huge business to grow at a double-digit rate, at least through 2025.

Aiming toward higher profits

The stock wouldn't be a no-brainer buy in the absence of a brightening financial picture, though, and there's even better news on this point. Amazon's cash-flow trends have improved sharply in the past year, rising to a $32 billion inflow from an $11 billion outflow in 2022.

AMZN Free Cash Flow Chart

AMZN Free Cash Flow data by YCharts.

More of those gains are flowing directly into higher profits. Amazon's operating income soared to $13 billion this past quarter, compared to $3 billion a year ago. That spike has helped the company completely recover from its post-pandemic earnings hangover. Operating profit is back near an all-time high of about 6% of sales.

Still, there are far more profitable options in the cloud services space. Microsoft's Azure platform competes with Amazon's Web Services division. The company is converting over 40% of sales into profits right now. Amazon's 6% profit margin is closer to pure-play retailers like Target than it is to a tech giant like Microsoft or Apple.

The bullish thesis, then, depends a lot on the company establishing new highs on this core financial metric. Even modest moves into the low double digits could translate into huge profit gains.

Amazon's ample cash flow, along with the growing importance of the cloud services segment, suggests this move could be coming in 2024 and beyond. That services division now accounts for 55% of the broader business, and the proportion is likely to rise over the next few years.

The stock doesn't look too expensive, given these highly positive factors. You can own Amazon for about 3x revenue, a relative steal compared to Microsoft's price-to-sales (P/S) ratio of 13 and Apple's P/S ratio of 8.

Yes, there's no guarantee Amazon's stock valuation will climb toward these tech giants' premiums. But investors have some good reasons to believe it will, likely driving excellent shareholder returns over the long term.