Amazon could reach a $2.5 trillion stock market value by 2024, and its very profitable cloud business is a big reason why, according to a new report from MKM Partners.

MKM's Rob Sanderson wrote on Wednesday that Amazon Web Services could be worth $1 trillion in six years, more than the current market cap of the entire company, which currently sits at $929 billion. Apple crossed the trillion-dollar mark earlier this month.

"We still think that AMZN is the best long-term growth investment available to investors today," Sanderson wrote. He raised his 12-month price target to $2,215 from $1,840.

In addition to improving margins at AWS, Sanderson expects greater profitability in the company's fulfillment operations following aggressive expansion in 2016 and 2017, and he sees Amazon investing heavily on fresh food delivery. The company spent $13.4 billion last year on the acquisition of Whole Foods.

By 2025, Amazon will control 14.5 percent of the U.S. retail market, putting it ahead of Walmart, Sanderson predicts.

As for AWS, Sanderson projects a 35 percent operating margin in 2024, up from 26,9 percent in the second quarter and a high of 28.5 percent at the end of 2015. By 2025, AWS will represent almost 32 percent of Amazon's $88 billion in profit, according to Sanderson's estimates.

Even so, Sanderson's model does see AWS growth moderating to 37 percent in 2019 from 46 percent this year. In recent quarters Google and Microsoft have both said they expect their competing public clouds to grow faster than AWS, which is by far the market leader.