I accumulated most of my position in Amazon (AMZN 0.78%), the world's largest e-commerce and cloud platform company by revenue, roughly five years ago for an average purchase price of $630. It's been a big winner since then, with a gain of nearly 400% -- but I don't plan to ever sell my shares, for three simple reasons.

1. The power of AWS

Amazon's most important business isn't its consumer-facing e-commerce marketplaces. It's AWS (Amazon Web Services), the cloud infrastructure platform it launched nearly two decades ago.

AWS provides cloud storage and computing power to a massive list of clients like McDonald's and Verizon, and controlled 32% of the global cloud infrastructure market in the fourth quarter of 2020, according to Canalys. Its closest competitor, Microsoft's Azure, held a 20% share.

An illustration of cloud computing connections.

Image source: Getty Images.

AWS has higher margins than Amazon's e-commerce business. That's why AWS generated 59% of Amazon's total operating profits in fiscal 2020, despite only bringing in 12% of its total revenue.

Amazon's decision to disaggregate AWS' financials in 2015 convinced me to finally invest in the company, because it could clearly subsidize its lower-margin marketplaces with its cloud-based profits.

So as long as AWS keeps growing, Amazon can continue expanding its e-commerce business with aggressive promotions, loss-leading strategies, cheap hardware devices, and fresh perks for Prime subscribers. That growth engine won't sputter out anytime soon, either: AWS' revenue rose 30% to $45.4 billion in 2020, and its operating profit increased 47% to $13.5 billion.

2. The power of Prime

Amazon surpassed 150 million Prime subscribers worldwide at the end of 2019. That figure likely rose throughout 2020 as the pandemic forced more people to shop online.

Amazon's growing list of perks for its Prime subscribers -- including discounts, free shipping options, and free streaming media -- likely nurtured that growth, on top of its ever-expanding ecosystem of hardware devices. Amazon's subscription revenue (which mainly comes from Prime) rose 31% to $25.2 billion, or 7% of its top line, in 2020.

Amazon's Echo speakers.

Image source: Amazon.

That high-margin subscription revenue, along with AWS' operating profits, enable Amazon to continue selling its cheap Echo and Fire devices, creating and licensing new content for Amazon Video and Amazon Music, and adding new online and offline perks to lock in its shoppers.

This virtuous cycle, which the company expands offline via Whole Foods, Amazon Go, and its other brick-and-mortar stores, makes Amazon a very tough retailer to beat. None of Amazon's retail rivals own both a profitable cloud infrastructure platform and a massive subscription service, and those growth engines should support its e-commerce growth for decades to come.

3. The power of its ads

Amazon quietly became the third-largest digital advertising platform in the U.S. after Alphabet's (GOOG 1.32%) (GOOGL 1.43%) Google and Facebook (META 2.49%) in 2018, according to eMarketer. Amazon sells ads within its own marketplace and on third-party websites and apps. Amazon's third-party sellers often purchase those ads to drive traffic to their marketplace listings.

Buying ads directly on Amazon might be more appealing than buying ads on Facebook or Google, since people are already visiting Amazon to buy products. Amazon can also tap a user's browsing or shopping history on its platform to craft appealing targeted ads, but it doesn't pull more personalized data like Google or Facebook -- which are both top targets for privacy advocates.

Amazon doesn't break out its annual advertising revenue yet, but its "other" revenue -- which "primarily includes" its ad sales -- rose 52% to $21.5 billion, or 6% of its top line, in 2020. That growth was impressive, especially since Facebook and Google both struggled with slower ad sales throughout the pandemic.

Amazon won't overtake Facebook and Google in the ad market anytime soon, but this high-margin, oft-overlooked business could become a second profit engine alongside AWS in the near future.

The key takeaways

In a frothy market filled with overvalued stocks, Amazon still looks surprisingly cheap at 47 times forward earnings and three times next year's sales. Its near-term growth might be bumpy as it faces tough post-pandemic comparisons, regulatory threats, and a CEO transition.

But over the long term, I believe AWS will continue growing and Amazon's e-commerce ecosystem will keep expanding, and the company will quietly evolve into an advertising powerhouse. Therefore, I don't see any reasons to ever sell my shares of Amazon.