Amazon (AMZN 1.44%) Web Services (AWS) is the largest public cloud platform in the world. It controlled 48% of the public cloud market in 2018, according to Gartner, and it offers its services in 69 availability zones across 22 global regions.

Many analysts focus on AWS' rivalry with Microsoft, which ranked second with a 16% share last year. Yet fewer analysts discuss the ways it competes with Chinese tech giant Alibaba (BABA -1.24%), which ranked third with an 8% share.

However, Alibaba Cloud nearly doubled its revenue in 2018, easily outpacing the growth of Amazon and Microsoft's cloud platforms. It's also the largest cloud platform provider in China by a wide margin.

A cloud icon floating over a tablet.

Image source: Getty Images.

That's why it wasn't surprising when AWS CEO Andy Jassy recently told Nikkei that Alibaba was catching up in the cloud market. Jassy noted that Alibaba didn't have "much of a presence in the U.S. or Europe right now," but that it was a major competitor in China. Amazon currently ranks fourth in China's cloud market, according to Canalys, with a 9% share.

Based on those facts, investors might be wondering if Alibaba is a better cloud stock than Amazon. However, a deeper dive into both businesses reveals that Amazon is easily a better long-term play on cloud computing for three simple reasons: its reputation, scale, and profitability.

The key differences between Amazon and Alibaba

Alibaba is often called the "Amazon of China", since it owns the top e-commerce and cloud platforms in the country. But under the surface, Alibaba and Amazon operate very different business models.

A warehouse filled with boxes.

Image source: Getty Images.

Both companies generate most of their revenue from their e-commerce marketplaces. However, Alibaba's core Taobao and Tmall marketplaces only facilitate transactions between individuals and businesses. These marketplaces don't take on any inventories, and fulfill orders via third-party logistics services.

Amazon's first-party marketplace takes on inventories and fulfills its orders with its own logistics network, which resembles the lower-margin business model of Alibaba's main rival JD.com, the top direct retailer in China. However, Amazon's third-party marketplace operates in a similar manner as Taobao and Tmall.

As a result, Amazon's marketplace operates at much lower margins than Alibaba's marketplace. Last quarter, its North American business had an operating margin of just 3%, and its international business remained unprofitable. Alibaba's core commerce business had an operating margin of 31.7% last quarter.

However, AWS is consistently more profitable than Amazon's marketplaces. The cloud unit generated just 13% of Amazon's sales but 72% of its operating profit last quarter. Its operating margin of 25.1% also made it Amazon's most profitable business unit.

Alibaba's cloud business, which generated 8% of its revenue last quarter, remains deeply unprofitable, just like its smaller digital media and innovation initiatives businesses.

This indicates that Alibaba subsidizes the growth of these side businesses with the profits from its e-commerce marketplaces. Amazon adopts the opposite strategy by subsidizing the growth of its e-commerce ecosystem with the profits from its cloud business.

Why that difference matters

This stark difference tells us two things. First, AWS' first mover's advantage, its presence across multiple countries, and its massive scale gives it superior pricing power against its rivals. Alibaba -- which faces aggressive competition from Tencent, Baidu, and AWS in its home market -- doesn't have as much room to raise its prices to improve the unit's profitability.

Second, Alibaba's dependence on its core commerce unit's profits leaves its cloud business more exposed to the economic slowdown in China. Alibaba's core commerce business is still growing, but its revenue growth decelerated last quarter, and looks even worse after excluding the low-margin revenue from its brick-and-mortar and logistics investments. If that slowdown continues, Alibaba might need to rein in its cloud investments.

AWS is also vulnerable to macro headwinds, but the cloud market is arguably better insulated from an economic slowdown than its e-commerce marketplaces. Furthermore, AWS is already consistently profitable, so it can likely afford to keep making big investments through market downturns.

The bottom line

Amazon's cloud business clearly looks stronger and more sustainable than Alibaba's. However, Alibaba's core commerce business still generates plenty of cash to fund the expansion of its cloud platform into new overseas markets like Singapore, India, Japan, Australia, and the U.S. Therefore, Amazon is a better cloud stock for now -- but Alibaba remains a solid long-term investment that still looks cheap relative to its long-term growth.