2022 has been most unkind to investors. Inflation, war, and pandemic-related disruptions have all taken a heavy toll on the global economy and financial markets around the world.

Even titans like Amazon (AMZN 2.08%) are not immune to the carnage. Like many growth stocks, the online retail juggernaut's shares are down sharply this year.

Amazon remains dominant in both e-commerce and cloud computing in the U.S. and many other countries. Yet traders appear to be discounting this fact, as sluggish online retail sales and rising costs have dented its profits in recent quarters.

Could this be the opportunity investors have been waiting for?

The bull case for Amazon stock

Despite the recent slowdown, global e-commerce sales are still projected to exceed $8 trillion by 2026, up from $5.2 trillion in 2021, according to Statista. That leaves plenty of room for Amazon to grow its roughly $500 billion revenue base into an even more massive sum in the coming years. This sales growth, combined with the company's cost-reduction initiatives and automation investments, should help to drive Amazon's profits sharply higher over time.

Amazon's advertising business also stands to benefit from the expansion of the e-commerce market. Third-party sellers already account for more than half of the sales on Amazon's online marketplaces. Amazon's constantly expanding array of seller services is helping these merchants scale their businesses. This includes Amazon's highly regarded advertising platform, which is proving popular among merchants seeking to market their wares to the e-commerce giant's massive user base.

Perhaps the most powerful argument in favor of investing in Amazon is its prominent position within the cloud. Amazon Web Services (AWS) is the leading provider of cloud infrastructure services in an industry that's forecast to grow to $947 billion by 2026, up from $445 billion in 2021, according to research firm Markets and Markets. AWS is already highly profitable; it generated $5.7 billion in operating income in the second quarter alone. And it's set to become a far larger and more valuable business as companies shift their operations to the cloud in the years ahead.

There are some risks to consider

No stock investment is without risk. That's true even for the mighty Amazon, which faces formidable competition in several of its most important markets.

Retail giants Walmart and Target bolstered their e-commerce capabilities in recent years. Target's acquisition of same-day delivery platform Shipt for $550 million in 2017 was particularly prescient. Shipt made Target a powerful force within the fast-growing, quick-delivery grocery market, an area in which Amazon is also seeking to expand.

In the cloud computing arena, Microsoft is a formidable foe. The tech titan made it easy for its longtime corporate customers to bundle cloud services with their existing software subscriptions. Its highly regarded Azure cloud platform grew revenue by an impressive 40% in its most recent quarter. 

Alphabet's Google should also not be overlooked. The search king reportedly priced its cloud services aggressively to gain market share. Google Cloud grew revenue by 36% in the second quarter, albeit from a far smaller base than AWS. 

Yet it's important to remember that e-commerce and cloud computing are massive markets that are likely to have multiple winners within them. So, despite these challenges, Amazon's long-term growth prospects remain intriguing.

Valuation suggests Amazon is priced fairly

Amazon's dominant competitive position and torrid growth drove investors to pay a hefty premium for its shares over much of its history. Yet that doesn't appear to be the case today.

Amazon's stock can currently be had for roughly 33 times operating cash flow. That's near the midpoint of its historical valuation range. It's also a fair price to pay for a high-quality business that's projected to grow at a 33% annualized rate over the next half-decade. 

So, is Amazon's stock a buy now?

While investors should note the risks inherent in an investment in Amazon, the e-commerce and cloud computing leader's attractive long-term growth potential and compelling valuation make its shares a solid buy today.