Higher inflation has been weighing on Amazon's (AMZN 1.49%) e-commerce business for about a year. But the company's other big business -- cloud computing services -- has defied the pressure, continuing to grow both revenue and operating income.

In Amazon's third-quarter earnings report this week, though, Amazon Web Services (AWS) showed that it isn't immune to the current economic troubles. AWS still grew at a double-digit percentage rate, but its growth fell short of analysts' expectations. As a result, the stock slid 7% in Thursday's trading session, and lost another 6.8% from there on Friday. That brought this year's decline to about 38%. Does this latest AWS news suggest that it's time to give up on Amazon -- or is this troubled stock a bad news buy?

The importance of AWS

First, let's talk about the role AWS plays in Amazon's earnings picture. It's a pretty important one. In recent years, AWS has driven the bulk of Amazon's profits. In 2021, it accounted for 74% of Amazon's total operating income. Cloud services are, by nature, a much higher-margin business than e-commerce. Amazon's overall operating margin stood at 4.4% a year ago, while AWS had an operating margin of about 30%.

Cloud computing services also are something many companies can neither do without nor manage on their own. But consumers can and do put the brakes on their spending and limit what they buy on Amazon when times are tough. 

In the third quarter, though, AWS clients started cutting back, which resulted in the segment missing analysts' revenue forecasts: AWS reported a 27% gain in sales, while the analyst consensus had been for an increase of 31%. That was also a slowdown from the 33% year-over-year gain in Q2.

It's possible this sales slowdown will be more than just a one-quarter phenomenon. Inflationary pressures and general economic troubles aren't over. And it may take some time for AWS customers to return to their usual financial situations. Management even said during the earnings call that the growth percentage rate for AWS actually was in the mid-20s toward the end of the quarter -- and the company is applying that to the fourth quarter.

That said, AWS has what it takes to handle the challenge. The company says it's helping its customers turn what are usually thought of as fixed expenses into variable expenses. Amazon has the tools available to help customers lower their cloud computing services costs when necessary -- and still stick with AWS, no matter what the economic environment. Clients can choose lower-priced options like scalable cloud services powered by Amazon's own Graviton processors, for example.

Is it time to buy?

So is Amazon a bad news buy? First, it's important to note that this week's news wasn't all that bad. Sure, we would have preferred to see growth accelerating in Amazon Web Services. But, considering the current economic situation, it's not surprising that there was a bit of a slowdown.

There are two bits of good news, though. First, as mentioned,  the breadth of AWS' offerings allows it to adjust to customers' needs during difficult times. Second, these difficult times are temporary. Once the economy improves, AWS' growth is likely to take off once again.

Now, let's consider Amazon's valuation. The company is trading for about 2 times sales -- its lowest valuation by that metric in about six years. That looks like a bargain price, particularly for people taking a long-term approach to investing in the company. AWS' future is promising. It's the leader in an industry that's forecast to grow rapidly. According to a report from Precedence Research, the size of the cloud computing market is set to increase at a compound annual rate of more than 17% through the end of this decade.

In the world of e-commerce, Amazon also is a leader. And according to research firm Statista, global retail e-commerce is set to grow by a total of 56% between 2021 and 2026. In short, today's e-commerce pains are likely to be temporary too.

All of this means that Amazon is absolutely a buy today. But let's forget about the "bad news" part -- because the news isn't as bad if we look at the company through a long-term lens.