Amazon (AMZN -0.73%) is having a lot of trouble with its retail business. Elevated inflation is contributing to a slowdown in demand, and rising costs for everything from labor to transportation are cutting into profitability. Consumers aren't as willing to open their wallets with a potential recession looming.

It's a very different story for Amazon's cloud computing business. Amazon Web Services (AWS) grew sales by 37% to $18.4 billion in the first quarter, and operating income jumped 57% to $6.5 billion. Fellow cloud giants Microsoft and Alphabet saw similar results. Microsoft's Azure cloud platform grew by 46% in its most recent quarter, and Google Cloud posted 44% growth.

Given this impressive growth in the face of a difficult economic environment, it's not unreasonable to think that the cloud computing industry, and AWS in particular, won't feel much pain during a recession. But there are two risks that investors shouldn't ignore.

An enterprise slowdown

One source of growth for the cloud computing giants is large enterprise customers moving workloads from legacy infrastructure to the cloud. This is capable of fueling the industry for many years to come. In an interview earlier this month, Amazon CEO Andy Jassy estimated that 95% of global IT spending is still not going to the cloud. That's a huge runway.

While the long-term picture is bright, big companies and organizations facing uncertainty tend to pull back on unnecessary tech spending. It's important to understand that cloud computing is not cheap. Cost savings are not guaranteed when moving from on-premises infrastructure to AWS, and there's the added cost of doing the actual migration. What the cloud buys you is nimbleness, flexibility, and scalability.

For a big company facing slumping demand from its own customers and rising costs, delaying or scaling back a planned migration to the cloud would be an easy thing to do. That's especially true if the goal was never cost savings in the first place. While companies are happy to tell a "digital transformation" story when times are good, keeping costs under control and profits up takes precedence when the going gets tough.

The Amazon Web Services logo.

Image source: Amazon.

A start-up "winter"

Another class of customer driving growth for the cloud giants are start-ups. A start-up is going to overwhelming choose cloud computing by default, and if they're flush with venture capital funding, they probably won't care all that much about optimizing their cloud spend.

Venture capitalists hurled cash at start-ups in 2021, investing over $600 billion globally. Hundreds of new unicorns were minted last year, far more than in previous years. It's a bonanza. And it's not going to last forever.

Whenever venture capital starts to become harder to come by, two things will likely happen. One, some start-ups with business models that never made much sense will fail, removing cloud computing customers entirely. And two, start-ups that do survive will start to care a whole lot more about keeping their costs in check.

It's easy to let cloud computing costs get away from you, and there are countless companies that specialize in optimizing cloud computing bills. While there's really no risk that start-ups are going to move away from the cloud, a widespread effort to reduce cloud computing spending can certainly slow down industry growth rates.

A cloud slowdown isn't impossible

There are no signs that demand for cloud computing is slowing down, but that may not remain the case if global economies fall into recession. Inflation is the highest it's been in decades and interest rates are set to rapidly rise. It's unlikely that any industry will escape without feeling at least some pain.

When you zoom out, demand for cloud computing is almost guaranteed to rise over time as companies look to take advantage of the benefits of the cloud. But in the near term, it's anyone's guess.