Three years ago, Amazon (AMZN 3.43%) looked invincible. The stock was setting record highs in late 2020 as investors predicted that the soaring growth rates from the pandemic would continue, even as costs remained low.

Both forecasts turned out to be flat wrong. Inflation pressured consumer spending while driving costs higher over the last few years, instead. Rising interest rates amplified these challenges and helped keep Amazon's stock below those record highs.

The next few years could be just as volatile for the e-commerce giant's business, and there's plenty that investors don't know about that future. Yet several big trends promise to shape Amazon's wider results from here, along with its stock returns.

Amazon is a more service-oriented business now

It's safe to assume that Amazon will be much more of a service business in a few years than it is today. That segment, home to things like the AWS platform, already accounts for a majority of the sales footprint, responsible for 55% of sales in the first nine months of 2023. It's growing much faster, too, at 17%, compared to a 4% uptick in product sales.

That's great news when it comes to the stability of this business. Service sales come from areas like Prime subscriptions and AWS contracts, which aren't nearly as volatile as day-to-day product sales. The more that Amazon can mature into a software-as-a-service stock, the more investors can count on increased clarity around annual sales and earnings trends.

Higher profits

Amazon is slowly making its way back toward the 6% profit-margin record it set a few years ago. That's better than traditional retailer rivals like Costco Wholesale can manage but is far below the over-40%-profit rate that growth-stock investors can get from a company like Microsoft.

There's a good chance that Amazon's margins will reach double-digits over the next few years, though. Operating income is already soaring, compared to last year, for example. The company generated $24 billion in profits in the past three quarters, up from $10 billion a year earlier.

Management projects profits as high as $11 billion in the holiday quarter, too, compared to $3 billion in late 2022. Amazon is targeting more balance between growth and profits today, and this approach should continue improving its finances over the next several years.

The "X" factor

One big benefit of owning Amazon stock is that there's always the potential for major tech-based growth to go along with its mature business lines. The company is investing heavily in artificial intelligence (AI), for example, which has made its way into products as varied as its smart speakers and e-commerce services platform.

This technology is boosting the value of Amazon's products in the same way that it is for Adobe's and Microsoft's portfolios. Yet Wall Street seems to be discounting the growth potential for Amazon. Shares are valued at less than 3x annual sales, compared to closer to 13x for both of these software-focused peers.

Investors can reasonably expect this valuation gap to shrink over the next few years as Amazon becomes more of a service business and its strong profit margin and cash-flow production boost overall returns. Look for the stock to likely outpace the market in that optimistic scenario.