There were a lot of questions swirling around Amazon (AMZN 2.29%) stock at the beginning of this year. Amazon Web Services' (AWS) growth rate slowed from 27% in 2021 to 12% in the third quarter of 2023. Inflation was high, labor was in short supply, and the stock traded at its lowest point since the pandemic crash, which was precisely why I pegged it as a great buy. The company's challenges were significant; however, they were short-term headwinds. With investors leaving in droves, it was a perfect moment to act like Warren Buffett and get greedy when others were fearful. The stock rocketed more than 80% in 2023 as the headwinds slackened.

As we head into 2024, there are reasons for continued optimism. Companies cut their data usage and advertising budgets in 2023 because of widespread fear of recession. The recession didn't materialize, and companies may loosen their purse strings in 2024 as a result. The two segments below will be beneficiaries.

Amazon Web Services

AWS functions much like a utility; customers pay for what they use. At the beginning of 2023, customers came to Amazon with a problem. The challenging economic environment necessitated scaling back on data usage spending. As Amazon's CEO Andy Jassy explained multiple times on earnings calls, Amazon was happy to assist them with cutting their spending even though sales in 2023 would suffer. The chart below shows that while sales reached $88 billion over the trailing 12 months, growth was tepid.

AWS sales and growth rate

Data source: Amazon. Chart by author. YOY = year over year. 

Jassy knows that keeping customers happy and on board for the long term is much more important than trying to squeeze more sales in the short run. This shows tremendous leadership. Now that a recession is less likely, these customers could spend more on data in 2024 than in 2023.

AWS will also benefit from the influx of generative artificial intelligence (AI) development. These programs require tons of data and primarily operate in the cloud. Plus, Amazon offers foundational models that allow customers to create their own programs, like custom chatbots, and run them on AWS. If AWS growth accelerates, the market will likely reward Amazon stock with a higher price.

Digital advertising

Companies also slashed their advertising budgets in 2023. Statista notes that advertising spending falls during an economic crisis but quickly bounces back, often within one or two years. So, the same logic applies here. As recession fears fade, inflation slows, and the Federal Reserve indicates that rate hikes could be done, advertising should begin to bounce back throughout the economy.

Amazon's pay-per-click, product placement, and featured product ads are popular because they reach consumers actively looking to purchase products. And they are effective. I rarely scroll past the first page when shopping on Amazon.com. For this reason, Amazon's advertising business actually grew more than 20% year over year in each of the first three quarters of 2023, far outpacing the industry. Digital advertising sales have been widely successful, skyrocketing from $19.8 billion in 2020 to $43.8 billion over the last 12 months. Sales should continue to boom, especially as advertising budgets return.

Amazon stock is on a tear this year but still trades about 17% off its all-time high, as shown below.

AMZN Chart

AMZN data by YCharts

The company is stronger than ever, with diverse revenue streams that make it less reliant on retail sales. Besides AWS and advertising, third-party seller services are thriving, and over 200 million people subscribe to Prime. Add to this the opportunities in AI, and it's easy to see why many investors are excited about Amazon.

The price-to-earnings (P/E) ratio is not a good measure of Amazon's value since its generally accepted accounting principles (GAAP) profits vary a lot from period to period, so I prefer to look at the price-to-sales (P/S) and price-to-cash flow from operations ratios. Both show Amazon as undervalued compared to the pre-pandemic period, as shown below.

AMZN PS Ratio Chart

AMZN PS Ratio data by YCharts

The stock probably won't match its fantastic 2023 run, but there is still room for gains in 2024. Plus, the long-term picture looks terrific.