Shopify's (SHOP 1.11%) stock journey over the past few years has mirrored the journeys of many other big-name, younger tech companies. From March 2020 to November 2021, it increased over 380%. In the next 12 months, it lost more than 75% of its value, and now it's up over 97% so far in 2023.

Regardless of the roller-coaster ride, there's no doubt that Shopify has made some millionaires along the way. A $40,000 investment in Shopify at its May 2015 initial public offering (IPO) would be worth just under $1.1 million today.

SHOP Total Return Level Chart

SHOP Total Return Level data by YCharts

Despite Shopify's success since its IPO, it doesn't measure up to how many millionaires Amazon (AMZN 3.43%) has created -- and may continue to create. A $40,000 investment in Amazon at the same time as Shopify's IPO would "only" be worth around $270,000 today, but that same investment from the time of Amazon's IPO would now be worth close to $60 million.

Those returns are once-in-a-generation, so you shouldn't expect them to be duplicated, but Amazon still seems better positioned to create more millionaires going forward.

Benefiting from e-commerce beyond its own platform

Amazon became the Amazon the world knows today because of the success of its e-commerce business. It accounted for 37.6% of all U.S. e-commerce spending in 2023. The next closest competitor was Walmart, at 6.4%. This dominance has laid the groundwork for its becoming the multifaceted giant it is today.

Amazon has been implementing changes to become more efficient, with one of the best seemingly being going from a national fulfillment network to eight regional networks. CEO Andy Jassy said it's put them on pace to deliver the fastest Prime speeds in the company's 29-year history. The move also puts Amazon in a position to benefit from e-commerce growth through its new logistics offering, Supply Chain by Amazon.

The service is a complete set of supply chain services, capable of picking up inventory from manufacturing facilities, storing and tracking inventory, handling ground transportation and international shipping, delivering directly to customers, and plenty more. Amazon is trying to make it a one-stop shop for supply chain logistics.

Amazon and Shopify will both benefit from the continued growth of e-commerce, but I believe Amazon is better positioned to take advantage of it by leveraging its logistics network and technological infrastructure, as well as through its own e-commerce business.

Multiple high-growth revenue streams

Cloud computing is another area Amazon dominates in with a 32% market share. Microsoft's Azure is in second place with a 22% share. Amazon Web Services (AWS) accounts for over 62% of Amazon's operating income while being only 16% of its revenue.

AWS is a true profit-generating machine, and cloud services are in the early stages of what they will likely become, especially with the progression of AI. The global cloud computing market is expected to grow 20% annually through 2030. With Amazon's market share, even growing at the market pace will boost its overall business and profitability.

Amazon's fastest-growing segment, advertising, is also in the early stages of what it can become. Amazon has long been in online advertising, but Prime Video's growth and the growth of connected TV are opening new (and lucrative) advertising avenues.

A good value relative to its growth opportunities

Shopify is a top-tier growth stock, so it's no surprise that it has a high valuation, but this comes with increased expectations. Its price-to-sales (P/S) ratio is almost 5 times Amazon's, suggesting a much steeper price for its revenue growth potential. The P/S ratio isn't the end-all and be-all when it comes to valuing stocks, but it provides perspective on how investors value a company's sales.

SHOP PS Ratio Chart

SHOP PS Ratio data by YCharts

Amazon still has a lot of growth opportunities in front of it. It's consistently growing in cloud computing, advertising is becoming a viable revenue source, and it's making developments in areas like healthcare and logistics. That's a recipe for a strong growth trajectory.

For a $40,000 investment to hit $1 million in 20 years, it would need a compound annual growth rate (CAGR) of around 17.5%. Amazon's CAGR over the past 20 years is 22.4%, proving it can do it, but it'll be tougher this time around. Still, Amazon's market dominance, constant innovation, and adaptability don't give investors a reason to bet against its sustained long-term growth.