For the average consumer, the name Amazon (AMZN -1.11%) is synonymous with e-commerce. If you're like me, the sight of an Amazon box on the front porch is a frequent occurrence. Historically, it's been these e-commerce purchases that have led to the majority of Amazon's stock gains, even as the business has diversified over time.

While Amazon's e-commerce business still represents the bulk of its revenue, investors considering buying shares now may want to look deeper at the other parts of the business to see the real reason the company is a buy right now.

Headwinds persist for e-commerce

While Amazon's core business is still a major force in the retail space, recent macroeconomic events have presented some headwinds. Amazon reports results in three segments. North America and international are the two largest, as they represent everything from e-commerce sales to subscription revenue in those geographic regions. Amazon's third segment is Amazon Web Services (AWS).

In the recently reported second quarter of 2022, the North America segment grew 10% year over year, while the international segment declined 12%. Operating income for these segments dropped 120% and 590%, respectively. 

The drastic falloff in operating income was due to inflationary pressures, fulfillment network productivity, and fixed cost deleverage. Management expects some improvement in the second half of the year, but these margin concerns have muted the overall results for Amazon. 

AWS continues to shine

In contrast to the recent struggles on the e-commerce side of the business, AWS has continued to put up impressive results. Q2 revenue for AWS was $20 billion, good for a year-over-year increase of 33%. The segment now accounts for 16% of Amazon's overall revenue, up from 13% in the year-ago quarter. Its operating income grew 36% as well, making up for some of the lost ground in the other segments.

This growth in AWS is vitally important to Amazon's business, as well as current and potential shareholders. The segment currently has 34% of the worldwide market share of cloud infrastructure services. This is a pretty sizable lead compared with Microsoft's Azure, which accounts for 21% of the market share. 

The cloud infrastructure market is estimated to grow an average of 16% per year through 2030. If Amazon is able to simply keep its current lead, the growth of the industry alone will ensure years of revenue growth for AWS.

Smaller businesses to watch

Within Amazon's 10-Q Securities and Exchange Commission filing, there is some information on smaller products and services that are worth keeping an eye on. Of this group, revenue from physical stores, subscription services, and advertising services are of particular interest to me.

Revenue from physical stores grew 12% in Q2. While this only accounts for 4% of overall revenue, this is decent growth for a part of the business most are not even aware of. It will be interesting to see if this becomes a larger part of the business over time.

Subscription services -- which comprises things like Amazon Prime memberships, as well as video, audiobook, music, and e-book subscriptions -- increased 10% year over year, representing 7% of overall revenue. While Amazon doesn't provide this information, it's reasonable to assume this would be higher-margin revenue, helping the overall profitability of the business.

The smaller segment with perhaps the biggest upside is advertising services. Similar to subscription services, revenue from advertising only makes up 7.2% of overall revenue. However, this is an increase from Q2 of 2021, when it represented 6.6% of overall revenue. Considering the revenue generated from advertising on other platforms with large user bases, it seems like this could be a considerable revenue generator should Amazon devote resources to building this out.

Bottom line for investors

I want to be clear that the e-commerce part of Amazon's business is facing temporary headwinds. I think it will be a force to be reckoned with for years to come. That said, when considering Amazon as an investment in the future, I think it's worth considering the other parts of the business when making decisions about buying shares.

With a price-to-sales ratio of 3, Amazon is trading slightly below its 10-year average. For investors who see the potential in AWS, as well as some of the smaller parts of Amazon's business, shares today can be purchased at an appealing valuation.