After examining many stocks in today's market, I've concluded that Amazon (AMZN 3.43%) is one of the best buys available. Even though it's had a strong 2024, up 11%, I still think there is room for upside. I've pinpointed five factors that make Amazon a strong buy now, even with its great performance in 2024.

1. Amazon is no longer just a commerce business 

While Amazon is well-known for its commerce business, it has quietly transitioned to a service business. These divisions include third-party seller services, advertising services, subscription services, and its cloud computing business, Amazon Web Services (AWS). Combined, these segments brought in $92.9 billion in revenue versus the commerce side's revenue of $75.7 billion.

This is critical, as these services are vital for many businesses, which makes them more sustainable. Additionally, even though Amazon doesn't break out the profitability of each division, looking at similar companies like Shopify for third-party sellers or Alphabet for advertising, it's evident that services have much better margins. 

2. Amazon's margins have dramatically improved

This leads me to my next reason for buying. Thanks to the rise of service divisions, Amazon's gross margins have skyrocketed over the past decade.

AMZN Gross Profit Margin (Quarterly) Chart

AMZN Gross Profit Margin (Quarterly) data by YCharts.

A higher gross margin gives Amazon the potential to have a better profit margin, which has also improved in recent quarters after tanking thanks to overspending to fulfill pandemic-era demand. This will be a key metric for investors to watch as Amazon attempts to transition to becoming a company maximized for profits.

AMZN Profit Margin (Quarterly) Chart

AMZN Profit Margin (Quarterly) data by YCharts.

3. AWS is turning around

A key profit contributor is AWS, the cloud computing business. In the fourth quarter, Amazon's North American commerce business made $6.5 billion in operating profits, while the international business lost $419 million. However, AWS picked up the slack, producing $7.2 billion in operating profits despite having much lower sales figures (AWS had $24.2 billion in sales in Q4 versus North American commerce sales of $106 billion).

AWS saw its profitability dip slightly as 2022's Q4 operating margin was 24%. But it promptly recovered in 2023, and Q4 saw an operating profit of 30%

One item that has come into the spotlight is AWS's growth. In Q4, it was up 13%, while competitors Google Cloud and Microsoft Azure both saw revenue growth in the high 20% range. While there are multiple reasons for this, Amazon's management is starting to see new workloads come online, which should boost AWS's growth throughout 2024. This is key as AWS is vital to Amazon's profitability.

4. Reasonable valuation

While Amazon has had a strong year, its stock remains reasonably priced. Using traditional valuation metrics like a price-to-earnings (P/E) ratio isn't ideal with Amazon, as it isn't fully optimized for profits. Instead, I'll use the price-to-sales ratio to evaluate the business. At three times sales, Amazon is valued at about the same level it was in 2018 and still below where it was during the pandemic sell-off.

AMZN PS Ratio Chart

AMZN PS Ratio data by YCharts.

5. Improving cash flows

Last is maybe the most important factor of all: Improving cash flows. Amazon's cash flows are dramatically up due to AWS' turnaround, the rise of service divisions, and improving margins.

Amazon's Q4 cash flows were the highest they've ever been and helped propel its trailing-12-month total to new records.

AMZN Free Cash Flow (Quarterly) Chart

AMZN Free Cash Flow (Quarterly) data by YCharts.

With that cash, Amazon can pay down debt, repurchase shares, or fund dividends. Those actions benefit shareholders and are the primary reasons for investing in Amazon's stock.

Despite Amaozn's strength since the start of 2023 and so far in 2024, it's still a great buy right now.