The current market environment has been brutal for even the best growth stocks. Investors have plenty to worry about, including the escalating conflict in Europe, global supply chain disruptions, and the possibility that the Federal Reserve's plan to tame inflation will drive the economy into a recession.

Against this backdrop, Amazon (AMZN -1.11%) has no shortage of challenges. The war in Ukraine is driving up fuel prices. Supply chain bottlenecks are making it difficult and more expensive to source products. And soaring inflation is leading consumers to cut back on discretionary spending.

An investor is looking pensively at a declining stock chart.

Image source: Getty Images.

Together, these and other issues resulted in Amazon's e-commerce sales falling 3% year over year in the first quarter, while its costs rose significantly. Investors responded by selling off its stock. Amazon's shares ended the trading day on Friday down 14% and near their 52-week lows.

Could this panic-fueled sell-off be the buying opportunity you've been waiting for?

Amazon is not just an e-commerce company

Many investors still view Amazon primarily as an online retailer. And for good reason; Amazon controls nearly 40% of the U.S. e-commerce market. It generated a whopping $66.5 billion in online store sales in the first quarter alone, which comprised the lion's share of its revenue. So it's certainly understandable that investors focused most of their attention on the recent downturn in Amazon's e-commerce business.

However, it's important to note that Amazon generates most of its profits from its fast-growing cloud computing division. And that business is firing on all cylinders.

Amazon Web Services (AWS) grew revenue by 37% to $18.4 billion in the first quarter. Its operating income increased by an even more impressive 57%, to $6.5 billion. Remarkably, AWS was able to grow its sales at an extraordinary pace and expand its profit margins despite Microsoft's and (Alphabet-owned) Google's best efforts to wrestle away market share.

Better still, AWS has long runways for growth still ahead. Cloud computing is a massive global market that's projected to expand by 19% annually to more than $1.2 trillion by 2028, according to Grand View Research. AWS is the clear leader in this booming industry, with a roughly 33% market share, according to Synergy Research Group. With the cloud market slated to expand rapidly, AWS should have plenty of room to grow its sales and profits while maintaining its leadership position in the coming years. 

So, is it time to buy Amazon's stock?  

With its shares down sharply following its post-earnings swoon, much of the near-term risks to Amazon's e-commerce operations are now reflected in its stock price. Amazon's current share price also likely understates its enormous long-term opportunity in cloud computing. For these reasons, now seems like a good time to consider building or adding to a position in Amazon. 

Investing in high-quality businesses when they're on sale is a proven way to build wealth in the stock market -- and buying shares of Amazon today could help you do just that.