Amazon's (AMZN 1.49%) struggles with rising inflation aren't new. In fact, the e-commerce giant has wrestled with this problem in two ways for more than a year. It's added to Amazon's overall costs -- from transporting goods to running warehouses. Higher inflation also is hurting customers' wallets, and that means they're looking to spend less on their shopping.

The bright spot always has been Amazon's cloud computing business, Amazon Web Services (AWS). Until recently. Yes, the business's revenue still is growing in the double digits. But growth has slowed, and even here, customers are looking to cut costs. Should you worry about this latest shift?

AWS and the earnings picture

First, let's talk about how AWS generally fits into the Amazon earnings picture. Prior to this difficult period -- and back when Amazon's earnings were climbing -- AWS was a key contributor to profit. For example, in 2021, AWS' operating income represented more than 70% of Amazon's total operating income.

Not only is AWS the global leader in the cloud computing services market, but it's also continued to post significant growth over time. For instance, AWS has regularly reported quarterly sales growth in the range of 30% to 40%. And operating income growth has often topped 40%. This even continued as economic woes settled in and major indexes strayed into bear territory.

So, even though Amazon's e-commerce business has suffered recently, the company still could count on significant growth from AWS. But in the past two quarters, Amazon started talking about a shift in AWS clients' behavior. They've started to focus on cutting costs when possible, and this now is weighing on AWS' growth. AWS offers clients various data storage options, some costing less than others.

In the fourth quarter, AWS net sales rose 20% and operating income fell 2%. Operating margin also narrowed to 24.3%. That's compared to nearly 30% in the year-earlier quarter.

AWS' revenue only grew in the mid-teens in the first month of this year, too, showing this movement isn't over. In fact, Amazon expects this challenge to continue for the next couple of quarters.

Increasing investment

Meanwhile, Amazon has favored investing in this business that's driven profit over time. The company last year increased investment in technology infrastructure, to support AWS development, by $10 billion.

This picture may look kind of grim. But before you decide to sell your Amazon shares -- or avoid the stock -- let's consider some other points.

First, customers aren't leaving AWS. They're just adjusting their spending right now because budgets are tight. This is a temporary situation. And the fact that AWS has flexible solutions for them could encourage them to stick around over the long run. This is important because it should help AWS keep its global leadership in the market.

Second, AWS' pipeline of new customers is "healthy and robust," Amazon said in its recent earnings call. So, AWS continues to grow its market position -- even if customers are spending less at the moment.

AWS' sales contribution

It's also important to consider AWS' sales contributions to Amazon even in these difficult times. AWS' sales climbed to $21.4 billion in the quarter and more than $80 billion for the year. Amazon's total sales reached about $149 billion and $514 billion for those periods, respectively.

Amazon isn't out of the woods yet. Today's economic headwinds are still weighing on the company -- and even on its biggest moneymaker, AWS. But this is a temporary situation linked to the economic environment. And, in spite of it, AWS continues to grow and bring in new customers. At the same time, Amazon is making the necessary investments to keep AWS on top once the economic pressure eases.

All of this means you shouldn't worry about the AWS slowdown, even if it persists as Amazon predicted. That's because this doesn't change AWS' long-term outlook -- or your chances of winning as a long-term investor in the company.