You know it best as the king of e-commerce. But for the past several years, the crux of the bull thesis for Amazon (AMZN 0.58%) has been Amazon Web Services (AWS), which is not only the leader of the cloud computing market but also Amazon's biggest moneymaker ... by a country mile.

Now, however, this engine of Amazon's profits is running into a headwind of its own. While its revenue continues to rise, its profitability continues to shrink. Without any viable explanation as to when or even if the company can reverse this bottom-line trend, Amazon shares are tough to own.

A cloud computing headwind is blowing 

The chart below says it all: AWS has grown every single quarter it has existed, all the way through the first quarter of this year. Its operating income, however, peaked at the start of 2022 and has steadily dwindled since then. Operating profit margin for the segment now stands at multiyear lows on the order of 24%.

Image showing the declining profitability of Amazon Web Services.

Data source: Amazon. Chart by author. Revenue and operating income figures are in billions of dollars.

Shareholders might argue that this shrinking profitability could have a great deal to do with the macroeconomic environment. And there's some legitimacy to that. Everything is more expensive than it was just a few quarters ago, including hardware and electricity. Amazon isn't immune to higher costs.

But there might be more that is hurting AWS than is evident in its profit numbers alone. Its market share is essentially stagnant, while cloud rivals Microsoft and Alphabet are taking share.

Chart illustrating the stagnation of Amazon Web Services share of cloud computing revenue compared to competitors' growing share.

Data source: Synergy Research Group. Chart by author.

AWS' contracting profitability and slowing growth could ultimately point to marketability challenges. These might not be resolved merely by price concessions to its customers, either. Alphabet's Google Cloud, along with Microsoft's Azure, are certainly pricing their services just as competitively.

The trends could also indicate AWS cannot offer something specific that cloud computing customers increasingly want.

Hold off on stepping into Amazon for now

Amazon isn't doomed. It can adapt as needed, and in the meantime, its North American e-commerce operation is back in the black.

AWS' profitability -- and now its sales trends -- are troubling all the same, though, and even more so now that we can see it isn't gaining market share while its top competitors are. As noted above, the company's success in the cloud computing market was a core piece of the bullish argument for owning Amazon, since it was producing the lion's share of the company's total income. Now, it's on the defensive.

Potential investors may want to steer clear, especially in light of the stock's 55% year-to-date rally. We're only about a month away from hearing second-quarter results that could further underscore Amazon's cloud computing struggle. The potential downside brings too much risk to new positions right now.