A stock market sell-off in 2022 has dragged down the shares of numerous companies, with Amazon's (AMZN 0.58%) stock down 50% year to date. Rising inflation throughout the last year has made investors wary of consumer-reliant businesses such as e-commerce. 

However, despite macroeconomic headwinds, Amazon has continued to see growth within its e-commerce business over the last year. Along with a booming cloud computing service and consistent growth in advertising, Amazon has a promising outlook for next year. 

Here are three reasons to buy Amazon's stock before 2023. 

1. Amazon is dominating a $369 billion market

One of the best reasons to invest in Amazon is its swiftly growing cloud computing business with Amazon Web Services (AWS). The platform boasts a leading 34% market share, with the industry worth $368.97 billion and expected to see a compound annual growth rate (CAGR) of 15.7% until 2030. As a result, AWS is likely to see significant gains from the burgeoning industry for years. 

However, Amazon's role in cloud computing is already paying off. In the third quarter of 2022, AWS more than pulled its weight by providing 100% of the company's operating income. The cloud computing segment hit $20.5 billion in revenue, rising 27% year over year, with operating income earning $5.4 billion.  

Cloud computing has safeguarded Amazon in a challenging economic year and will likely continue to grow in 2023. The company's Q3 report revealed AWS had $104.3 billion in unearned revenue as of Sept. 30, with future earnings coming from long-term contracts that will complete in about 3.8 years.

AWS is on a promising trajectory for growth, and with over $100 billion in guaranteed revenue ahead of it, it's an excellent reason to buy Amazon stock. 

2. Leading market share in e-commerce 

Amazon's e-commerce business has been a sore spot for investors over the last year, as unfair revenue comparisons to 2021 have dampened earnings reports. The pandemic lockdowns prevalent throughout 2021 led to record sales for Amazon as homebound consumers flocked to its e-commerce site for necessities. However, even moderate growth in 2022 has continued to be impressive amid a year of economic decline. 

In Q3 2022, Amazon's online stores' revenue climbed 7% year over year to $53.5 billion, excluding fluctuations in foreign currency exchange. Meanwhile, its third-party seller revenue increased 18% to $28.7 billion as more merchants chose Amazon's marketplace to sell their products.

Additionally, the most promising part of Amazon's e-commerce business is its Prime membership, which earned $8.9 billion in revenue last quarter. The subscription-based strategy improves margins and makes it easier for consumers to shop online with Amazon, thanks to free expedited shipping.

In 2022, Amazon U.S. Prime memberships hit 157.4 million, representing about 59.8% of the population. According to eMarketer, that figure will grow to 168.3 million members in 2025, 62.4% of the U.S. population.

E-commerce may have been under threat in 2022, but economic headwinds are temporary. In fact, consumer spending has risen for the last three quarters, according to the Federal Reserve. If the trend continues, Amazon investors could be all smiles in 2023. 

3. Digital advertising growth

With titans like Alphabet and Meta in the digital advertising industry, it might feel like Amazon doesn't stand a chance. However, the company has made significant headway in the market over the last few years. From 2019 to 2022, Amazon's market share in digital ads increased from 7.8% to 13.3% and is expected to rise to 14.6% in 2023. Meanwhile, Alphabet's market share has fallen from 37% in 2019 to 34.9% in 2022.

According to GlobeNewswire, the global digital advertising market will reach $786.2 billion by 2026 at a CAGR of 13.9%. Amazon has already profited off the industry's growth, with its advertising services revenue in Q3 2022 rising 25% year over year to $9.5 billion. 

Amazon has had a rough 12 months. However, economic downturns will not last forever. The company has grown its position in lucrative industries in 2022 despite market challenges, proving it's a worthy long-term investment and an excellent buy before 2023.