All eyes were on Amazon (AMZN -1.65%) last week as the king of e-commerce released its 2022 second-quarter earnings. After posting soaring growth for several quarters during the pandemic, things have now cooled down. In the retail division, it's the same story as at other retailers; rising costs and lower spending are slowing revenue and nibbling into profits. At the same time, other segments, such as the weatherproof Amazon Web Services (AWS), still have momentum.

Amazon is a huge company with many moving parts. How can investors make sense of them, and what does this all mean for Amazon stock? Let's find out.

The No. 2 company in the U.S. and gaining

Amazon is the second-largest company (by sales) in the U.S. behind retail behemoth Walmart. Walmart is so massive, with $572 billion in 2021 sales, that it has eclipsed the rest by a long shot for many years, even with low revenue growth. But Amazon has made strides and, with pandemic-fueled growth, is within striking distance of Walmart's lead with $470 billion in 2021 sales.

The company produced a net loss of $2 billion in the 2022 second quarter, and this is the second quarter of net losses in a row. However, management typically measures progress in terms of operating income, which takes out taxes, interest, and other expenses not related to operating activities and which it sees (as many companies do) as a better overall indication of operational health. Operating income declined year over year from $7.7 billion to $3.3 billion. It's an important distinction to make since the net loss was incurred mostly by Amazon's investment in Rivian Motors, and it has been influencing Amazon's bottom line for several quarters.

In the second quarter, total company revenue increased 7% over last year to $121 billion, coming in at the top of the guidance range, and management is expecting that to pick up in the third quarter to a 13% to 17% revenue increase. Those numbers, which include Prime Day purchases in July, are past the spectacular pandemic increases as well as the lower tough-comps-to-beat increases of the past few quarters, and they're more in line with pre-pandemic rates of increase. As much as high growth looks attractive to investors, slow and steady growth is actually a greater sign of stability.

Operating income is expected to be between $0 and $3.5 billion as inflation is still weighing on the bottom line.

The magic of AWS

AWS continues to be an incredible revenue and income driver. The segment, which provides cloud computing services, forged several important new deals in the second quarter with such companies as Delta Air Lines and investment banking firm Jefferies Financial Group, and it upgraded many of its features to offer better service.

As usual, AWS posted phenomenal growth. Quarterly revenue increased 33% over 2021 to $19.8 billion. Operating income increased 36% to $5.7 billion, and that includes increased wages and technology investments.

Amazon CFO Brian Olsavsky said that he believes businesses are still in the early adoption phase of cloud computing. AWS is certainly making a name for itself as it develops capabilities in this area, and it's contributing its robust income to Amazon as other segments feel pressure.

Amazon has a lot more in store

Amazon has ventured into many areas on top of its e-commerce origins. AWS has clearly been a success as has the decision to open up to third-party sellers, which accounted for more than half of units sold in the second quarter.

Notably, Amazon recently acquired telehealth company One Medical for $3.9 billion. This augments its healthcare developments, which include live telehealth services and Amazon pharmacy. It's also launching in-person services.

Some of its other segments include physical retail and just-walk-out technology, which it's implementing in its own stores as well as marketing to clients.

Amazon is still raking in sales and entering new categories. While its stock might not offer the same growth opportunities it once did -- it's gained more than 1,000% over the past 10 years -- it affords investors a high-probability and low-risk chance for more gains over the next 10 years and longer. It's down about 18% this year, and now looks like a good entry point.