A $10,000 investment in Amazon's (AMZN 3.90%) stock a decade ago would be worth about $76,000 today. With that kind of long-term growth, it's hard not to be bullish about the retail giant. The company's business has exploded in recent years as it has become the go-to for online shoppers worldwide and carved out a leading role in the cloud market.

However, it hasn't been all sunshine and blue skies for Amazon. An economic downturn in 2022 saw its stock plunge 50% over a 12-month period, alongside significant declines in e-commerce profits.

Yet, the tech giant delivered an impressive turnaround last year, putting its business on a firmer footing for 2024. Amazon's stock has risen 80% since last January as its retail division has delivered multiple quarters of impressive growth. Meanwhile, a boom in artificial intelligence (AI) could mean major gains for its cloud platform, Amazon Web Services (AWS), over the long term.

Amazon's performance amid economically challenging times and its ability to return to growth demonstrate that this is a stock you can confidently buy and hold in a market downturn.

Coming out of an impressive growth year

Amazon had one of its most restorative years in business in 2023. After an economic downturn, the company immediately got to work restructuring its business with a priority on profitability. Cost-cutting measures, such as closing or halting construction on dozens of warehouses, sunsetting unprofitable projects like Amazon Care, and carrying out thousands of layoffs, have strengthened its business, making it less vulnerable to future market headwinds.

The tech giant's moves have paid off in the form of significant financial gains. In the third quarter of 2023, Amazon's revenue increased by 13% year over year, beating Wall Street estimates by $1.5 billion. Meanwhile, its North American segment hit over $4 billion in operating income, improving on the $412 million in losses it posted in the year-ago period.

AMZN Free Cash Flow Chart

Data by YCharts.

A turnaround in Amazon's e-commerce business, alongside consistent growth from AWS, has seen the company's free cash flow soar over the last year, which can be viewed in the chart above. The increase further proves the company's ability to navigate challenging market conditions successfully, making its stock one of the most reliable investment options.

Leading two rapidly expanding industries

Amazon is a cash machine with the funds to invest in its research and development and overcome potential headwinds. As a result, its dominating positions in e-commerce and the $65 billion cloud industry present countless growth opportunities.

E-commerce on its own is expected to surpass $3 trillion in spending in 2024 and expand at a compound annual growth rate (CAGR) of 9% through 2028. Meanwhile, Amazon holds leading market shares in online retail in dozens of countries. In the U.S., Amazon's e-commerce market share is at 38%. Comparatively, the second-largest share is held by Walmart, with 6%.

However, the best reason to invest in Amazon is AWS. The cloud platform leads one of the fastest-growing industries and has helped the company attain a powerful role in AI. The AI market exploded last year and has shown no signs of slowing, with AWS investing heavily in the technology. In 2023, AWS significantly expanded its library of AI tools to meet the rising demand for such services and recently announced a venture into chip development.

According to Grand View Research, the AI market is expected to develop at a CAGR of 37% until at least 2030. With businesses increasingly seeking ways to boost productivity through AI, Amazon is well positioned to profit considerably from the sector.

NVDA PS Ratio (Forward) Chart

Data by YCharts. PS Ratio = price-to-sales ratio.

Moreover, this chart shows Amazon's forward price-to-sales ratio is lower than many of its peers, indicating its stock is currently offering the most value. Alongside a return to profits in its retail business and a lucrative position in AI, Amazon is an attractive buy right now, especially during a market downturn.