Amazon (AMZN 0.35%) has had a great first quarter of the year, with the stock rising around 20%. But I think that's just the beginning. Amazon has a lot going for it, making it a great buy even after its recent run.

I've compiled three reasons why it is still a good buy. If you have some interest in the stock, I think these are good points to keep in mind when buying -- or at least holding the shares you've already purchased.

1. Gross margins are improving

While revenue growth excites investors for some time, they also want to see profits at the end of the day. But profits are limited by one major factor: gross margin.

Gross profit is what is left after subtracting the costs of goods sold, and it is essentially the maximum your profits can ever be (unless one-time benefits artificially inflate earnings to even higher levels).

Commerce businesses have historically had fairly slim margins since their primary business model is to buy a product and sell it for incrementally more to make a profit. But Amazon has found other ways to boost its gross margin, such as service businesses. Because its service divisions now account for more revenue than its store divisions, its gross margin has seen a significant boost recently.

AMZN Gross Profit Margin (Quarterly) Chart

AMZN gross profit margin (quarterly); data by YCharts.

These service divisions include Amazon Web Services (AWS), its cloud computing division; advertising services; third-party seller services, and subscription services. Of the company's seven segments, these four were the fastest growing in the fourth quarter.

These types of businesses tend to have higher gross margins. Unfortunately, Amazon doesn't break out these segments besides AWS, but compared to other companies whose primary business is related to these types of services, it reveals higher gross margins. So if they continue growing faster, gross margins will continue to increase.

This increases the ceiling for what the company's profits could eventually be, an exciting prospect for investors.

2. AWS could recover in 2024

Among its service divisions is AWS, which didn't have a great 2023. Many customers were optimizing their spending after years of massive expansion.

But the division's primary competitors, Microsoft's Azure and Alphabet's Google Cloud, didn't see that same weakness, so many investors expect AWS to recover in 2024.

Management is also optimistic because it continues to see that cost-control trend slow among its customers, while larger deals with longer commitments grow. As the demand for artificial intelligence (AI) data collection and model creation grows, demand for cloud computing products will only rise. AWS needs to present itself as a top option because Azure and Google Cloud have been doing a much better job.

If AWS starts to grow faster, it will generate more demand for the stock, as an important part of the company's growth thesis for years.

3. The stock is still well below previous valuation levels

Amazon is still not a maximally profitable company. Although it is producing ever-increasing net income, CEO Andy Jassy believes it has more cost controls to achieve.

So I'll use the price-to-sales (P/S) ratio to assess the company's valuation, since revenue has been steadier than its net income. Even after Amazon's valuation run-up, it's still below the levels it traded at from essentially 2018 to 2022.

AMZN PS Ratio Chart

AMZN PS ratio data by YCharts.

This is a great indicator for investors: It shows that Amazon could still reach a higher valuation and not be overpriced from a historical perspective. Combine that fact with a chance for revenue to increase with a better-executing AWS, and the stock could have room for more upside based solely on valuation.

All three of these factors combine to make me confident that Amazon's stock still has plenty of potential upside in 2024, even with its strong start.