Stock market sell-offs open up significant opportunities for long-term investors as many stocks are sold off just because of their short-term outlook. As a result, patient investors can scoop up many of the world's greatest businesses at a discount right now, as long as they have the mindset to hold for at least three to five years. In fact, this philosophy is one of Warren Buffett's fundamental tenets, saying to be greedy when others are fearful.

One stock that has significantly sold off is Amazon (AMZN 1.30%), and I've been increasing my position due to its weakness. However, I think the company still has a ways to go before reaching its peak, and investors should scoop up some shares before the market comes to its senses.

AWS has huge potential

Amazon has become much more than an e-commerce company. Its Amazon Web Services (AWS) cloud computing division is an absolute monster. AWS is the market leader by a long way in the $203.5 billion cloud infrastructure market.

Company Market Share
Amazon Web Services 34%
Microsoft Azure 21%
Alphabet's Google Cloud 10%

Data source: Synergy Research Group.

This market is expected to grow until 2030, when Precedence Research expects it to reach $1.614 trillion. If Amazon can capture 30% of that market, it would generate $484 billion in high-margin revenue annually. For reference, Amazon's current trailing-12-month revenue is $503 billion.

AWS posted an operating margin of 26% in Q3, so it will generate massive profits if it can maintain this margin through the infrastructure build-out.

However, consistent profits have eluded Amazon.

Amazon's sell-off has been overdone

One of the reasons Amazon's stock tumbled in 2022 (down 40% year to date) is disappearing profits. In 2020, net income was $21.3 billion. That metric rose to $33.4 billion in 2021. In 2022, Amazon posted a loss in Q1 and Q2. While Amazon returned to profitability in Q3, profits were still down 9% year over year.

Many of the losses earlier in the year dealt with Amazon's overstaffing, which the company promptly corrected. This means Amazon's 2023 will look much better than 2022, even if consumer demand starts dissipating.

Another reason Amazon's stock has fallen is its overvalued state. From a price-to-sales standpoint, Amazon was too expensive a year ago.

AMZN PS Ratio Chart

AMZN PS Ratio data by YCharts

However, at 2 times sales, it has returned to a level not seen since 2016. But this valuation doesn't make a ton of sense. In 2016, Amazon was primarily a low-margin e-commerce business. Now, it has a high-margin AWS segment that is rapidly growing in addition to its e-commerce business, which is clawing back toward profitability.

Investors aren't including this in Amazon's investment formula and are also excluding another factor.

Advertising is Amazon's rising star

Amazon's advertising services rose 25% year over year to $9.5 billion in Q3 -- about half the size of AWS. Additionally, it just trailed AWS in terms of growth. Other companies that primarily deal in advertising have seen their revenue grind to a halt or even fall in Q3, yet Amazon displayed impressive growth.

A portion of this growth likely came from NFL Thursday Night Football games, but with $8.7 billion in revenue in Q2 (when football wasn't on Amazon Prime), it likely isn't a huge factor.

Advertising is usually a much higher-margin business than e-commerce, but Amazon doesn't break out operating expenses for this segment, so investors don't know if it's producing profits. Investors need to keep an eye on this business, but overall it boosts Amazon as a whole.

Amazon is like a coiled spring, ready to explode when released. I think that will occur throughout 2023 when its profits return, but even if it doesn't, the long-term opportunity in cloud computing makes me a buyer of the stock. This will likely be the last opportunity to purchase Amazon stock under $100, so don't waste it.