One of the golden rules of investing is to never put all your eggs in a single basket. By diversifying your portfolio across a wide range of stocks, bonds, and other assets, you reduce its volatility and help insulate yourself from market downturns. That's why it's sometimes smarter to simply invest in an S&P 500 index fund or exchange-traded fund, instead of individual stocks.

But if I could only invest in a single stock, I'd pick one with a market-leading position, a diversified business model, and a wide moat. I'd also pick one that has consistently outperformed the S&P 500. One stock checks all of those boxes: Amazon (AMZN -0.00%), the world's largest e-commerce and cloud infrastructure company.

An Amazon Go store.

Image source: Amazon.

Why did Amazon consistently beat the market?

Amazon went public on May 15, 1997, at a split-adjusted price of $0.075 per share. It has rallied 293,233% since then, so a $1,000 investment in its IPO would be worth $2.93 million today. That same investment in an S&P 500 index fund would have only grown to about $7,600. It also delivered market-beating gains for investors who didn't hop aboard its IPO right away. Over the past 10 years, its stock rallied more than 730% as the S&P 500 rose nearly 210%.

From 1997 to 2024, Amazon's annual revenue grew at a compound annual growth rate (CAGR) of 36%, from $148 million to $638 billion. It turned profitable on a generally accepted accounting principles (GAAP) basis in 2003, and its net income increased at a CAGR of 42%, from $35 million to $59.2 billion, over the following 21 years. Those explosive growth rates attracted a stampede of bulls and helped it consistently crush the market.

What are Amazon's core growth engines?

Amazon's growth was fueled by the expansion of its e-commerce marketplace, which grew from just 1.5 million customers at the time of its IPO to an estimated 310 million active users today. It has locked more than 240 million of those customers into its Prime subscriptions, which provide exclusive discounts, free shipping options, streaming media services, and other perks. It reinforces the stickiness of that ecosystem with its Alexa-enabled devices, and it reaches even more brick-and-mortar shoppers through its Whole Foods Market stores (which it acquired in 2017).

Amazon's advertising business sells promoted listings and display ads across its platforms. It's now the third-largest advertising platform in the U.S. after Alphabet's (NASDAQ: GOOG) (NASDAQ: GOOGL) Google and Meta Platforms' (NASDAQ: META) Facebook, and that segment generates higher-margin revenues than its core marketplace business.

However, Amazon's biggest profit engine is still Amazon Web Services (AWS), which controlled 32% of the global cloud infrastructure market in the first quarter of 2025, according to Canalys. The market's demand for its cloud-based computing and storage services is surging as more companies pivot away from on-site servers and launch more cloud, mobile, and AI services. In 2024, AWS generated 17% of Amazon's net sales but accounted for 58% of its operating profits.

Amazon's higher profits from AWS and its advertising business subsidize the ongoing expansion of its lower-margin retail business. That's why it can afford to sell its products at lower prices than many of its brick-and-mortar rivals, while retaining its Prime subscribers with loss-leading discounts and perks.

How much bigger can Amazon grow?

Amazon's growth is slowing as it matures, and its retail business faces stiff competition from superstore survivors like Walmart (NYSE: WMT), cheap cross-border e-commerce challengers like PDD's (NASDAQ: PDD) Temu, and warehouse club leaders like Costco (NASDAQ: COST). But it plans to keep expanding its marketplace into higher-growth emerging markets as it upgrades its fulfillment centers and logistics network with more AI, robotics, and automation services.

The growth of the AI market should also drive more companies to ramp up their spending on AWS, which provides the computing power, storage, and tools for creating new AI applications. Amazon will also expand its advertising business with more ads on Prime Video and Alexa. These two higher-margin businesses should drive its long-term profit growth.

From 2024 to 2027, analysts expect its revenue and earnings per share to grow at CAGRs of 10% and 19%, respectively. It might not be a bargain at 34 times next year's earnings, but it's still an easy way to profit from the growth of the e-commerce, cloud, AI, and digital advertising markets. So if you could only buy a single stock, Amazon would be a great pick.