Talk to most people about Amazon.com, (NASDAQ:AMZN) and they'll likely point out the vast number of products they can easily order online and have delivered in just two days. Or maybe they'll talk about the company's Amazon "basics and essentials" line of products that allows them to buy everything from bed sheets to batteries, from USB cables to underwear -- all with Amazon's logo on them.

With Amazon's e-commerce sales accounting for 88% of the company's top line in its most recent quarter, it's no wonder that many people think of Amazon as just a retail company. But if you're considering buying Amazon's stock (or if you're already a shareholder), then there are two very important -- and fast-growing -- business segments that you need to be aware of.

A worker in an Amazon fulfillment center.

Image source: Amazon.

Amazon's lucrative cloud computing business

While Amazon made its name selling books and now sells nearly everything you can imagine, one of the company's most lucrative segments is actually its cloud computing business, called Amazon Web Services (AWS). This business sells cloud computing hosting and services to everyone from individual developers all the way up to tech giants like Netflix.

What started out as a small part of the company's business a few years ago has ballooned into the No. 1 cloud infrastructure service with 33% of the market, easily outpacing both Microsoft and Alphabet's (NASDAQ:GOOG) (NASDAQ:GOOGL) Google cloud services.

Not only is AWS the biggest player, but Amazon earned more in operating income from AWS in the first six months of this year than it did from its U.S. retail sales. AWS brought in $3.04 billion in operating income from $11.54 billion in sales the first half of this year, while the company's U.S. retail operating income was $2.98 billion from $62.89 billion in sales.

AWS sales also grew faster than U.S. retail sales in the second quarter of this year, up by nearly 49% from the year-ago quarter, compared to U.S. retail sales of growth of 44%. This is great news for the company and its investors, because the cloud computing market is expected to grow from a $153.5 billion market in 2017 to one worth $302.5 billion by 2021, according to Gartner.

Clearly, investors are making a mistake if they overlook the importance of AWS to Amazon's business. But there's another opportunity that Amazon has been quietly building as well.

Amazon's rising advertising business

As impressive as Amazon's AWS is, Amazon has also been growing its advertising business over the past few years -- and it has the potential to eclipse AWS' profits in the next few years.

New research from eMarketer shows that Amazon is now the third-largest digital advertising platform in the U.S. with 4.1% of the market, behind the ad leaders Google and Facebook. Amazon is expected to grow that market share to more than 7% by 2020, and while it will fall far short of Google and Facebook -- which will likely hold a combined market share of 55.9% by then -- Amazon's top and bottom lines with benefit nonetheless.

eMarketer says that U.S. advertisers will spend $4.61 billion on Amazon's platform this year, and Jefferies analyst Brent Thill thinks Amazon's ad revenue could spike to $22 billion by 2022. Big operating income gains will likely accompany that sales growth.

Piper Jaffray analyst Michael Olson believes that Amazon's advertising operating income will surpass the company's AWS operating income by 2021, with advertising bringing in $16 billion and AWS reaching $15 billion. That's notable considering that until now, AWS has easily been Amazon's most profitable business.

Watch these businesses from now on

Investors are right to have focused on the company's retail business in the past, and e-commerce will always be one of Amazon's most important revenue streams. But dominance in cloud computing and a fast-growing advertising business should be significant factors when crafting an investing thesis for this company.

Amazon's top line will likely be driven by its e-commerce sales for years to come, but it's becoming increasingly clear that AWS and advertising are where its operating profits will be made. Just as Amazon has shed its online bookseller persona, it's time investors view this company as far more than just an online retailer.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. Suzanne Frey, an executive at Alphabet, is a member of The Motley Fool's board of directors. Teresa Kersten is an employee of LinkedIn and is a member of The Motley Fool's board of directors. LinkedIn is owned by Microsoft. Chris Neiger has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Alphabet (A shares), Alphabet (C shares), Amazon, Facebook, Jefferies Financial Group Inc., and Netflix. The Motley Fool recommends Gartner. The Motley Fool has a disclosure policy.