Amazon's (AMZN -0.27%) stock is up 66% over the last 12 months after a stellar growth year. Cost-cutting measures and investment in lucrative sectors like artificial intelligence (AI) have put the company on a promising trajectory that could offer major gains over the long term.

2023 was a year of recovery for Amazon, as it brought its e-commerce business back to profitability and expanded its cloud platform, Amazon Web Services (AWS). The tech firm's earnings and free cash flow soared, putting it on a solid financial footing for 2024.

With lower costs and growth catalysts throughout tech, the company could be in for another impressive year that you won't want to miss out on. So here are three reasons to buy Amazon stock in 2024.

1. The right moves have led to soaring earnings

Macroeconomic headwinds throughout 2022 brought down the entire tech market and led the Nasdaq-100 Technology Sector to plunge 40% throughout the year. Amazon was not unscathed, with its stock falling 50% during the period alongside steep earnings declines.

However, a market downturn can sometimes be the best test of a company's worth as a long-term investment. And Amazon's performance under pressure has proven it's one of the most reliable stocks.

After repeated hits to its business in 2022, Amazon got to work restructuring its operations, with a priority on profits. Cost-cutting moves like closing dozens of warehouses, thousands of layoffs, and shuttering unprofitable projects like its telehealth platform Amazon Care have been instrumental to the company's recovery.

In the third quarter of 2023, Amazon posted revenue growth of 13% year over year, beating Wall Street forecasts by $1.5 billion, while operating income more than tripled. Much of the tech giant's growth came from its e-commerce business. Its North American segment posted more than $4 billion in operating income, significantly improving on the $412 million in losses it posted in the year-ago quarter.

Moreover, Amazon's restructuring has seen its free cash flow skyrocket 427% over the last year to $17 billion. The company is in the best financial health it's been in years, with the funds to keep investing in its business and overcome potential headwinds.

2. AWS is the best reason to invest in Amazon

Amazon is best known for the popularity of its online retail site, which accounts for more than 80% of its revenue. However, the company's biggest growth driver has quickly become AWS. The cloud platform earned 60% of Amazon's $11 billion in operating income in Q3 2023.

The cloud market has exploded in recent years. The COVID-19 pandemic boosted the sector, as countless businesses moved operations online and adopted hybrid working styles. Meanwhile, cloud computing looks likely to become one of the most lucrative areas of AI. Companies are increasingly seeking ways to boost productivity with the help of AI and turning to cloud services to do so.

According to Grand View Research, the AI market is projected to expand at a compound annual growth rate of 37% until at least 2030, which would see it exceed a value of $1 trillion. With its leading 32% market share in the cloud sector, AWS is well positioned to reap major benefits from AI.

Over the last year, AWS has added a diverse range of AI tools and announced a coming venture into chip production. Alongside significant financial resources and brand power, Amazon could become one of the biggest threats in AI -- if it isn't already.

3. Plenty of room left to run in 2024

Despite last year's bull run, Amazon's stock remains down about 17% from a high it hit in July 2021. The figure could mean the company's shares have plenty of room left to run in the new year. Meanwhile, EPS estimates are even more optimistic.

AMZN EPS Estimates for Next Fiscal Year Chart

Data by YCharts

This chart shows Amazon's earnings could reach nearly $5 per share by fiscal 2024. Multiplying that figure by the company's forward price-to-earnings ratio of 44 yields a stock price of $211, projecting stock growth of 36% over the next fiscal year.

Alongside recent cost-cutting measures and a highly profitable cloud business, Amazon stock is a no-brainer in 2024.