The S&P 500 Index has climbed more than 20% from its bear market low, prompting many to call a bull market. This may be a bit premature, because generally, the index also must reach a new high in order to usher in this new growth phase. But it's clear we're getting very close to the next bull market, and that means it's a great time to buy stocks that may benefit the most.

One of those players is Amazon (AMZN -1.25%). The stock already has started to show some spark, advancing in the double digits since the start of the year. But it still has plenty of room to run, especially in a market environment that favors growth stocks. Let's check out three reasons to buy shares of this market giant.

1. Leadership in two high-growth markets

Amazon is a leader in the high-growth markets of e-commerce and cloud computing. Both are set to grow in the double digits throughout this decade, and Amazon is well positioned to benefit.

In e-commerce, the company continues to strengthen its Prime membership service. One particular focus is the speedy delivery of orders, and it's making serious progress here. Right now, Amazon offers same-day or one-day delivery on tens of millions of top products. In the second quarter, more than half of all Prime orders in the 60 largest U.S. metro areas arrived in this timeframe. And Amazon's data show fast delivery matters, as promises of fast delivery of a particular item result in customers buying more often.

As for cloud computing, Amazon Web Services (AWS) is the market leader by far. And Amazon said customers, struggling with tight budgets earlier in the year, now are recovering. AWS has started to see many of them return to deploying new projects. All of this is positive because AWS generally drives profit for Amazon.

2. A new cost structure for success

When higher inflation and general economic woes weighed on Amazon's earnings last year, the company took action. Amazon improved its cost structure through steps such as cutting jobs, investing in high growth areas like technology infrastructure, and making improvements to its fulfillment network.

Speaking of fulfillment, a particular move there could significantly boost Amazon's efficiency over time. The company shifted to a regionalized fulfillment model from a national one. So instead of your order traveling across the country to your doorstep, it's sent from a regional center closer to your home.

All of these efforts are great in difficult economic times and are helping Amazon's earnings recover and grow. In the most recent quarter, Amazon's free cash flow switched to an inflow from an outflow and operating income and net sales both increased. The cost structure efforts also should serve Amazon well during good times, leading to stronger growth and potentially share price gains.

3. Amazon's set to benefit from an AI Revolution

Amazon has been using artificial intelligence (AI) for quite some time across its business. AI is what helps the e-commerce site recommend products to you, for example, based on other items you've already purchased. And Amazon uses AI in the area of logistics for everything from managing supply to designing the best delivery routes.

These days, Amazon is going all in on this powerful technology, using it for tasks such as identifying defective products or making smart assistant Alexa even better. The company recently unveiled an Alexa that can carry on a conversation with you and perform a series of everyday duties. So, Amazon is using AI to make its business more efficient and better serve e-commerce customers.

AWS also is making big moves in AI, developing products that make the technology a snap for its cloud computing customers. For instance, through Amazon Bedrock, clients can build AI applications without managing infrastructure. They simply use the provided foundation models, tailor them to the particular company's needs, and use AWS tools to deploy the application.

So, it's fair to say Amazon could benefit from an AI revolution, with potential for cost savings and efficiency and gains in revenue. And all of this could translate into share performance over the long run.