Unsurprisingly, e-commerce sales have been slowing down for Amazon (AMZN -1.65%). They surged at the pandemic's onset, when hundreds of millions of folks were looking to avoid shopping in person. But that elevated level was not sustainable. Eventually, people would return to a more typical mix of online and in-person spending.

That time has come, so Amazon's e-commerce sales took a hit in its recently completed quarter. Online sales declined by 3% in the first quarter of 2022. Amazon reported $51.1 billion of revenue in the category, down from $52.9 billion in the same quarter last year.

A delivery person holding packages.

Image source: Getty Images.

The slowdown was to be expected. Consider that during the same time in 2021, there were far more business restrictions worldwide. As economies continue reopening over the next four to six quarters, investors can reasonably assume that Amazon's online sales will be challenged.

Nevertheless, the news seems to have caught investors off guard, and the stock sank in response. Fortunately, Amazon's other two segments -- Amazon Web Services and advertising -- are still profitable and thriving. Let's dive in.

Amazon Web Services saves the day

Amazon Web Services increased sales by 37% year over year in the first quarter. The segment accounted for 16% of Amazon's overall sales and all of the operating income. AWS generated $18.4 billion in sales and $6.5 billion in operating income; excluding AWS, the rest of the business would have generated an operating loss. Investors can be encouraged that the company's most crucial segment is growing revenue at such a robust rate.

AMZN Operating Income (Quarterly) Chart

AMZN Operating Income (Quarterly) data by YCharts.

Amazon in recent years has also boosted its advertising business -- which makes sense. After all, hundreds of millions of shoppers visit Amazon's website, and marketers would love the opportunity to influence their buying decisions. Moreover, many of these customers have a payment method on file and are one click away from purchasing. Amazon arguably offers advertisers the chance to influence consumers at the closest proximity to making a purchase.

In the first quarter of 2022, Amazon's advertising revenue increased by 23% to $7.9 billion. Over the last four quarters combined, Amazon has generated over $32 billion in ad revenue. Admittedly, the growth rate in the segment is decelerating from its peak of 88% in Q2 2021. Still, it has grown over 20% in six consecutive quarters. Marketers spent $763 billion globally in 2021, so Amazon's growth in the industry is another encouraging trend for shareholders.

Amazon's stock is crashing following first-quarter earnings

However, the market was focused on Amazon's slowing e-commerce sales and rising costs on the day following its earnings announcement. The stock got hammered and was down over 14% by midday. Investors are justified in being concerned; if it weren't for AWS, the company would have lost over $2 billion in operating income in the first quarter.

AMZN Chart

AMZN data by YCharts.

What's worse, management is forecasting that its troubles will continue in Q2. Sales are expected to grow less than 10% again, and operating income is expected to fall by several billion dollars from Q2 of last year. Stay tuned, and watch how Amazon handles changing consumer behavior as the pandemic evolves.