The S&P 500 recently hit another record high on the continued strength of artificial intelligence and with some significant help from Nvidia (NVDA 6.18%) stock's relentless climb. Nvidia now makes up 5% of the index, and its market cap blasted through the $2 trillion mark, making it worth more than Amazon (AMZN 3.43%) for the first time, as shown below.

AMZN Market Cap Chart

AMZN Market Cap data by YCharts

Nvidia could continue the charge higher. It's a tremendous company (albeit an expensive stock). But investors shouldn't overlook Amazon. Here are my four top reasons why Amazon stock is worth buying like there is no tomorrow.

1. AWS is seeing a resurgence

There was much handwringing last year as Amazon Web Services (AWS) growth slowed to 13%, after growing 29% in 2022 and 37% in 2021. Revenue eclipsed $90 billion for the year, but some speculated that the golden age of cloud computing growth was over. This is premature, and I expect growth to accelerate this year.

Declining data usage budgets were a massive obstacle in 2023. Businesses hunkered down for a recession that never came, and Amazon actively assisted its customers in lowering their data usage costs. Budgets are likely to loosen this year as fears of a recession ease. While this headwind fades, a new tailwind emerges. Much of AWS' sales are usage-based (much like a utility), so the rise of generative artificial intelligence (AI) software should spur growth because of the massive data needs.

Investors and analysts will watch AWS closely this year. A resurgence in growth could be a catalyst for the stock.

2. Amazon's free cash flow is back

Economic stimulus during the pandemic's height pushed Amazon's free cash flow (the amount of money left after paying for expenses and fixed assets) to record highs, but multiple challenges saw it plunge in 2022. There were snarls at the ports, a shortage of workers, and record inflation, all of which caused increases in costs.

AWS was also a victim of its own success. The massive growth meant massive investments in equipment (CapEx) were needed. Amazon spent a combined $125 billion on CapEx in 2021 and 2022, compared to $57 billion in 2020 and 2021. That is a ton of cash, even for Amazon.

These challenges ironed themselves out in 2023, and free cash flow roared back, as you can see below.

AMZN Free Cash Flow Chart

AMZN Free Cash Flow data by YCharts

Amazon will surely use the cash to invest in growth, but it could also institute a share buyback program if it chooses.

3. Amazon's advertising segment impresses

One of Amazon's fastest-growing revenue streams is online revenue, which includes product placement, pay-per-click, and video. Advertisers are eager to purchase these spots because they know that the ads are reaching customers who are actively looking to buy. If you are like me, you rarely scroll past the first page, and sellers know it. Advertising sales have exploded, going from $13 billion in 2019 to $46 billion in 2023.

This marked the first time ad sales beat out Prime subscription sales ($47 billion versus $40 billion). The segment should also benefit from loosening budgets in 2024. This is another terrific, growing revenue stream for Amazon.

4. Consumer sentiment is on the upswing

You can count me among those who thought rising interest rates and slowing economic stimulus would crimp consumer spending. But there are few signs that consumers are pulling back. In fact, consumer sentiment, widely considered the leading indicator of consumer spending, is rising steadily, as shown below.

US Index of Consumer Sentiment Chart

US Index of Consumer Sentiment data by YCharts

The number is still below pre-pandemic levels but has climbed impressively while inflation declines. This is excellent news because consumer spending is critical to Amazon's e-commerce business. Speaking of inflation, it has dropped to 3.2%. This shows that the Federal Reserve's interest rate hikes are taming inflation, and the economy is still growing. We aren't quite out of the woods yet, but so far, so good.

Amazon stock has risen significantly over the last year, but it trades at a discount to its 5-year averages based on sales and operating cash flow. The tailwinds above make it an excellent long-term investment.