Amazon (AMZN -1.11%) Web Services (AWS) is the world's largest cloud infrastructure platform and its parent company's biggest profit driver. AWS serves big clients like Comcast, Adobe, and the CIA, but it's been losing ground in one key market: brick-and-mortar retail.

Walmart (WMT -0.32%) and Target (TGT 0.70%) recently partnered with AWS' top rivals in the cloud market, Microsoft's (MSFT -0.66%) Azure and Alphabet's (GOOG 0.56%) (GOOGL 0.69%) Google Cloud. Walmart signed a five-year partnership with Microsoft that designates Azure as its preferred cloud platform provider, and Target agreed to migrate "key areas" of its business to the Google Cloud Platform.

A cloud icon hovers over a businessman's tablet.

Image source: Getty Images.

Why are big retailers avoiding AWS?

Both deals indicate that Amazon's ongoing war on brick-and-mortar retailers is pushing them into the arms of rival cloud platforms. For big retailers like Walmart and Target, it's an obvious choice -- the growth of AWS' higher-margin business supports the expansion of Amazon's lower-margin marketplace, so using AWS basically funds a war against themselves.

Therefore it would be wiser to partner with Microsoft or Google, which don't have much interest in online retail. This puts Amazon at a disadvantage in the growing retail cloud market, which could grow from $13.2 billion to $40.8 billion between 2017 and 2023, according to Mordor Intelligence.

Walmart and Target aren't the only brick-and-mortar retailers cozying up to Amazon's rivals. Google gained Home Depot as a Google Cloud customer in 2016, while Microsoft convinced Costco and Walgreens to start using Azure last year.

Not every retailer hates Amazon

The retail cloud market might seem like a blind spot for Amazon, but not every retailer is eager to partner with Microsoft or Google. Plenty of smaller brands -- including Lululemon, Under Armour, Brooks Brothers, and Rent-A-Center -- are still AWS customers.

Best Buy, which is frequently called an "Amazoned" retailer, recently partnered with Amazon to sell Fire TVs at its stores. Best Buy also agreed to become a merchant in Amazon's marketplace. An AWS deal wasn't included, but the partnership could make it easier for Amazon to lock in Best Buy as a cloud customer.

Boxes of appliances.

Image source: Getty Images.

But these issues highlight AWS' biggest weakness

Amazon isn't only losing ground in the brick-and-mortar retail market -- it also faces defections in the tech market. Apple, for example, moved a large portion of its iCloud data from AWS and Azure to Google Cloud over the past two years. Apple probably didn't want to become too dependent on Amazon, which was becoming a competitor in certain markets like cloud backup services, streaming media, set-top boxes, and smart speakers.

This means that as Amazon disrupts more markets, it risks antagonizing companies that still need cloud services. If those companies see Amazon as an enemy, they're more likely to view Microsoft and Google as allies.

Should Amazon investors worry?

Amazon investors shouldn't worry, since AWS remains the top cloud infrastructure platform in the world. The unit's revenues rose 49% annually to $6.1 billion last quarter, and its operating income surged 79% to $1.6 billion.

Microsoft's Azure generated 89% annual growth last quarter, although the company didn't reveal an exact revenue figure. Google also recently claimed that it was generating about $1 billion in cloud revenue per quarter.

Citi Research recently estimated that AWS would generate $44 billion in cloud revenues by 2020, compared to just $19 billion for Azure and $17 billion for Google's Cloud Platform. Therefore AWS should lead the cloud platform market for the foreseeable future, but its relationship with Amazon's other businesses could hurt its chances with companies that feel threatened by the tech giant's monstrous growth.