Amazon's (AMZN -2.46%) stock price is quietly up more than 30% so far in 2023, and more gains appear likely. Here's why the cloud and e-commerce juggernaut's recent bull run is set to continue -- and perhaps even intensify.

1. AI is set to reaccelerate cloud growth

In late April, Chief Financial Officer Brian Olsavsky said that Amazon Web Services' (AWS) revenue growth had slowed to roughly 11% from 16% in the first quarter. The news drove some investors to sell, though Amazon's stock has since recovered its losses. 

Investors are likely beginning to realize that much of the slowdown in AWS' growth rate is due to recession fears, which are driving many businesses to temporarily temper their technology investments. Yet even if we do fall into a recession, the economy will eventually strengthen, and this intense pressure to cut costs will ease.

In the meantime, Amazon is actively working to help its cloud clients reduce their expenses. Management correctly believes that this will strengthen customer loyalty and further cement Amazon's place atop the cloud industry.

Moreover, Morgan Stanley analyst Meta Marshall posits that the industry's efforts to optimize customers' spending will help to expand the overall size of the cloud market by as much as 30% over the long term. In all, Marshall estimates the total cloud-computing opportunity at a staggering $18 trillion. 

Some investors think that Microsoft (NASDAQ: MSFT) will capture a larger share of this massive pie thanks to its multi-billion-dollar investment in ChatGPT maker OpenAI. But although Big Softy might be off to an early lead in the artificial intelligence (AI) race, Amazon has a well-crafted plan to catch up, fast.

Rather than trying to lock users into a few AI models, like those offered by OpenAI, Amazon wants to make a large variety available to its cloud clients. "We believe that customers are going to need a lot of different generative AI models for different purposes, and it is unlikely that any one model is going to serve all customers or even all the needs of one customer," AWS CEO Adam Selipsky said during a recent interview with The Wall Street Journal

AWS, in turn, is offering access to technology provided by AI upstarts such as Hugging Face, Stability AI, and Anthropic, as well as its own recently launched Titan suite of models. 

For all these reasons, Amazon's leading cloud market share seems well-secured -- and its cloud growth rates appear set to reaccelerate in the coming years.

2. Don't underestimate e-commerce

After writing off Amazon's sprawling e-commerce empire as simply a loss-making crusade, many investors are starting to wise up to its true profit potential.

It's true that brick-and-mortar retailers have enjoyed a revival over the past couple of years, which has weighed on Amazon's results. People, eager to leave their homes once COVID-related restrictions were eased, returned to their historical shopping destinations. But this resurgence is likely to prove temporary.

Retailers are beginning to shutter stores once again, including announcements for more than 2,000 closings in the U.S. alone so far in 2023. UBS analyst Michael Lasser believes that this number could climb to over 50,000 stores by the end of 2027.

Lasser sees the percentage of people who shop online rising from 20% to 26% by that time. Many smaller retailers can't afford to invest in their e-commerce operations, according to Lasser. This will be even more true if we enter a prolonged recession.

Amazon, meanwhile, stands to benefit from these trends. The online retail titan has aggressively shed costs to bolster its profit margins during the recent lull in e-commerce. These expense-reduction initiatives should position Amazon -- and its shareholders -- to profit handsomely as it gains retail market share in the years ahead.