Amazon's (AMZN 1.34%) cloud-computing business is a monster. Amazon Web Services (AWS) scoops up around one-third of global spending on infrastructure-as-a-service and platform-as-a-service, and it's become a mission critical provider to many of its customers. Free from managing their own servers, AWS customers can scale their infrastructure quickly and painlessly.

But as easy as it is to scale up usage of AWS's various cloud services, it's also easy to scale down. As economic uncertainty forces companies of all sizes to take a hard look at costs, the cloud is on the chopping block. Companies aren't moving away from AWS or cloud computing, but they are discovering waste, reducing consumption, and trading down to cheaper services.

A rare profit decline

AWS grew revenue by 20% to $21.4 billion year over year in the fourth quarter, but costs grew by nearly 30%. This led to a slight decline in operating profit for the segment. AWS produced operating income of $5.2 billion, down from $5.3 billion in the prior-year period. Segment operating margin fell to 24.3%, down more than five percentage points year over year.

Servers, networking equipment, and other data center components get depreciated no matter their utilization rate. Amazon builds out new capacity to meet expected demand, but when real demand falls short of those expectations, revenue won't keep up with costs. That's what's happening now.

How much room is there for customers to slash costs? Probably a lot. One estimate puts the percentage of all cloud-infrastructure spending that's wasted at more than 30%. Amazon expects the headwind caused by customers looking to lower costs to persist for at least the next couple of quarters. In January, AWS was growing at just a mid-teens rate.

If that mid-teens percentage growth rate persists for the entire first quarter, AWS revenue will be approximately flat on a sequential basis. In other words, the positive impact from new customers and increases in usage from some existing customers would be entirely offset by other customers scrambling to lower their cloud-computing bills.

What does the future hold for AWS?

Amazon CEO Andy Jassy suggested during the earnings call that this cloud-cost optimization was likely a temporary issue. Jassy used an example of a hypothetical company dialing down the amount of data it was analyzing to save costs, saying that such a move wasn't the best thing in the long run for that company, but it was an effective way to save money in the short run.

The problem with this line of reasoning is that some companies are almost certainly going to find that they never needed to spend quite so much on cloud-computing services in the first place. In some cases, companies will find and shut down instances and resources that had been forgotten about. In other cases, they may shift from expensive services to cheaper services, forgoing a bit of convenience to save a significant amount of money.

Beyond optimizing within the AWS ecosystem, some customers will also be looking outward. A great example of a potential source of major cost savings is content delivery. Amazon's CloudFront content-delivery network is easy to integrate with other AWS services, but it's expensive. Really expensive.

Using the AWS pricing calculator, a customer that runs 10TB of data through CloudFront via 50 million requests over the course of a month will pay $900. An alternative would be Cloudflare, which doesn't charge for bandwidth or requests but puts certain features behind paid plans. Cloudflare's business plan, which includes a 100% uptime service-level agreement, costs just $200 per month.

The benefit of using AWS for everything is convenience, but the downside is cost. Companies are starting to care a lot more about costs. In the long run, that's probably bad news for Amazon and its cloud-computing dominance.