Shares of Amazon (AMZN -2.56%) have gained impressive momentum after the e-commerce giant announced a 20-for-1 stock split on March 9, with the stock price up over 21% since then.

The stock's gains have substantially outpaced the broader market's rally as the S&P 500 has appreciated just over 7% during the same period. The latest rally isn't surprising as shares of Amazon, which will start trading on a split-adjusted basis on June 6, will become more accessible to retail investors. Amazon stock was trading at $3,380 a share when the market closed on March 28, so small investors had to shell out a lot of money to own one share.

A person holds a smartphone. They are surrounded by images of skyscrapers and charts.

Image source: Getty Images.

After the split, it is believed that the demand for Amazon stock could rise as the company would be able to attract more retail investors. However, it is also worth noting that a split is simply a cosmetic move that doesn't change the fundamentals of a company, so it shouldn't be treated as a long-term catalyst for the stock. Then again, Amazon's move to split its stock seems to have made its shares more expensive than before.

AMZN Chart

AMZN data by YCharts

Does this mean that it is too late to buy shares of the e-commerce giant? Let's find out.

A closer look at Amazon's valuation

Amazon stock is currently trading at 52 times trailing earnings. While that's higher than the 42-times earnings multiple Amazon was trading at before the stock split announcement was made, it is lower than last year's average earnings multiple of 65. What's more, Amazon stock is trading at a nice discount to its five-year average price-to-earnings (P/E) ratio of 128.

So, investors who haven't bought Amazon yet still have an opportunity to do so as the stock is relatively cheaper than before. Also, historical trends suggest that the split could give the stock a nice boost. Bank of America Global Research data suggests that stocks generate average returns of 25% in the year following a split announcement, beating the overall market's gains of just 9%. The gains in the consumer discretionary, technology, and healthcare verticals could range between 26% and 38% in a year following the announcement of a stock split.

Now, Amazon stock has already gained impressively since announcing its stock split, but it won't be surprising to see it head higher in the long run on account of the secular growth opportunities it is sitting on. Analysts expect the company's earnings to increase at an annual rate of 35% for the next five years, which makes the stock an enticing bet right now given its relatively attractive valuation.

Robust long-term growth is in the cards

Amazon finished 2021 with $470 billion in revenue, an increase of 22% over the prior year. The company's net income jumped an impressive 57% last year to $33.4 billion, or $64.81 per share. This impressive showing was driven by growth across all of Amazon's business segments -- the North American and the international e-commerce and subscriptions businesses, as well as the Amazon Web Services (AWS) cloud computing division.

More specifically, the North American and the international business segments recorded 18% and 22% year-over-year growth, respectively, last year and produced nearly 87% of the company's top line. These business segments seem built for long-term growth as the global e-commerce market is expected to clock 27% annual growth over the next five years, hitting a whopping $55 trillion in revenue by 2027.

Amazon reportedly controlled 13% of the global e-commerce market in 2020 based on the gross merchandise value (GMV), which refers to the total value of the merchandise sold. This puts the company in a nice position to deliver incremental revenue growth in the future, driven by the expansion of the market it operates in.

On the other hand, AWS was Amazon's fastest-growing segment last year, reporting a 37% increase in revenue to $62.2 billion. AWS accounted for 13% of the company's total revenue, but it could get much bigger in the long run thanks to Amazon's share of the cloud infrastructure market and the fast-growing nature of this space.

According to a third-party estimate, AWS controlled a third of the cloud infrastructure market at the end of the fourth quarter of 2021, enjoying a comfortable lead over second-place Microsoft, which held 22% of this market. With the global cloud computing market expected to clock an annual growth rate of nearly 18% through 2028, AWS should continue delivering eye-popping growth for Amazon in the long run.

Amazon is on track to benefit from multibillion-dollar markets where it enjoys a robust share. That's why investors who are still waiting on the sidelines and haven't bought this growth stock just yet shouldn't delay much, as Amazon is trading attractively right now, which may not be the case in the future.