2022 was a year to forget for Amazon (AMZN 1.88%), which lost roughly half its market value as investors fretted over the slowing growth of its e-commerce and cloud platform businesses. But over the past five years Amazon's stock has still risen nearly 50% and outperformed the S&P 500.

Could this drawdown represent a promising buying opportunity for investors who can tune out all the near-term noise? Let's reevaluate Amazon's growth trajectory, its near-term challenges, and where it might be headed over the next five years.

An Amazon Go store.

Image source: Amazon.

The past five years were kind to Amazon

Between 2016 and 2021, Amazon's revenue rose at a compound annual growth rate (CAGR) of 28% to $469.8 billion. Its annual operating margin jumped from 3.1% to 5.3%, while its net income grew at a CAGR of 69% to $33.4 billion. That growth was driven by the simultaneous expansion of its retail and Amazon Web Services (AWS) cloud businesses.

Amazon's retail business grew as it expanded its third-party marketplace, acquired Whole Foods Market in 2017, and gained more Prime subscribers (which exceeded 200 million worldwide in early 2021). AWS also grew rapidly as more organizations migrated their data and computing power to its cloud-based platform. AWS now controls 32% of the global cloud infrastructure market, according to Canalys, which puts it comfortably ahead of Microsoft's Azure (22%) and Alphabet's Google Cloud (9%).

AWS generated much higher-margin revenue than Amazon's lower-margin retail business. It subsidized the expansion of its Prime ecosystem with loss-leading discounts, perks, and brick-and-mortar stores with AWS' profits, giving it an edge against other big retailers like Walmart that couldn't rely on a higher-margin software business to boost their margins.

The pandemic generated strong tailwinds for both Amazon's retail business and AWS as more people shopped online and accessed more cloud-based services. Unfortunately for the bulls, both businesses now face tough near-term challenges.

What will it face over the next five years?

For 2022, analysts expect Amazon's revenue to only rise 9% to $510.7 billion as it posts a net loss of $895 million. Its e-commerce business lost its momentum as the pandemic-related tailwinds dissipated, inflation has been broadly curbing consumer spending, and supply chain constraints are reducing its third-party sales from Asia. AWS' revenue growth also cooled off as rising rates and other macro headwinds forced large enterprise customers to rein in their cloud spending.

As Amazon's top-line growth decelerated, it ramped up its spending on new Prime features and the expansion of its digital media services. It also faces increasing pressure to raise the wages of its warehouse workers. Intense competition from Microsoft and Google is also limiting Amazon's pricing power in the cloud platform market.

Those headwinds could all intensify if a global recession occurs. But for now, analysts still expect Amazon's revenue to reach $644.2 billion in 2024, which would still represent a CAGR of 11% from 2021. It's also expected to return to profitability in 2023 and post a net profit of $31.1 billion in 2024.

We should take those estimates with a grain of salt, especially as the economy faces so many unpredictable headwinds, but Amazon has already weathered three major recessions throughout its 25-year history as a public company. Therefore, unless aggressive new competitors suddenly emerge and disrupt Amazon in the e-commerce and cloud platform markets -- which I doubt will happen within the next five years -- Amazon will merely face cyclical challenges instead of existential ones.

Over the next few years, I believe Amazon will expand its higher-margin advertising business (which would complement AWS as a second profit engine), gain tens of millions of new Prime subscribers, and continue to challenge streaming media giants like Spotify and Netflix with its own audio and video services. Its gaming division should also continue to grow as it expands Twitch, launches more first-party games, and adds more titles to its Luna cloud gaming platform. It might also launch more brick-and-mortar stores to complement Whole Foods and widen its moat against Walmart and other larger retailers. 

Where will Amazon's stock be in five years?

In other words, Amazon could become a more diversified retail, tech, and media company by 2027. Assuming that it meets analysts' expectations for 2024 and continues to grow its top line at a CAGR of 10% through 2027, it could generate over $850 billion in revenue by the final year. If it's still trading at about two times sales, its market capitalization could easily double to $1.7 trillion in five years. Based on these expectations, I believe Amazon's drawdown in 2022 is a great buying opportunity for investors who think it will dominate the e-commerce and cloud platform markets for the foreseeable future.