Investors who want to benefit from the artificial intelligence (AI) boom often turn to Nvidia, and for good reason. The company is the global leader in AI chips, and that's translated into a surge in earnings in recent times. Investors in this tech giant have been winning too, as the stock has soared more than 200% over the past year.

Nvidia is one of the stocks referred to as the "Magnificent Seven," a group of technology players that are leaders in their industries -- and each one also happens to be investing in AI. So Nvidia isn't the only company set to score an AI victory and share that victory with investors.

In fact, another member of the Magnificent Seven is particularly interesting because it offers you exposure to AI as well as access to another high-growth business. So, forget Nvidia, and let's check out this top stock to buy now.

An investor talks on the phone and looks at something on a tablet.

Image source: Getty Images.

A trillion-dollar market

You probably know this company well, as it may deliver groceries, essentials, and general merchandise to your door -- or offer you access to entertainment like movies and books. I'm talking about Amazon (AMZN 0.75%). The company is an e-commerce giant, which is important considering the growth forecast for this market. Global retail e-commerce sales may surpass $8 trillion by 2027, representing a 38% increase from today's level, according to Statista.

Amazon is well positioned to benefit thanks to its dominance, but the company also has made moves in recent times that should ensure this leadership. After struggling with higher inflation back in 2022, Amazon improved its cost structure, cutting jobs, favoring efficiency, and making key changes across its fulfillment network. All of these efforts helped it recover from a difficult time, but they also should help Amazon thrive during better times, too.

For example, the company shifted its U.S. fulfillment model from a national one to a regional one -- meaning inventory of popular products is kept in areas throughout the country. This has shortened delivery times, helping Amazon lower its cost to serve. And this move also means Amazon is able to be more competitive -- offering a broader selection of items at lower average selling prices while still maintaining its profitability.

Though Amazon's cloud computing business -- Amazon Web Services (AWS) -- drives profit at Amazon, the North American business, which includes e-commerce operations, still represented about 40% of total operating income last year. So, Amazon's ability to grow and stay ahead in e-commerce is a crucial element for long-term success, and it looks like Amazon is on the right path.

Amazon and AI

Now, let's consider the company's AI story, which intersects with both its e-commerce and cloud computing businesses. Amazon has been using AI to improve its own operations, so this technology could play a role in lifting profitability this way over time.

For example, through AI, Amazon determines the best delivery routes, another element that's helped it save money and time on deliveries. Another example: Amazon uses AI to help customers rapidly find just the right products -- this, along with low prices and fast delivery speeds, could keep them coming back.

As for AWS, this business is going all-in on AI, offering everything from a wide selection of chips to a fully managed AI service that lets customers tailor top large language models for their own use. Here, Amazon is set to benefit from AI as it helps its customers deploy AI projects -- and since AWS is the world's biggest cloud company, it has direct access to an enormous number of potential customers.

All of this means Amazon is set to benefit from AI in two ways. The technology should help it save time and money in its own business operations, therefore boosting profitability over time. And Amazon's position as a provider of AI products and services through AWS also should add to profit.

Valuation: Amazon vs. Nvidia

So investors buying Amazon shares today gain access to all of this AI growth -- and the icing on the cake is the growth potential of the company's e-commerce business. It's not surprising that Amazon, valued at 42x forward earnings estimates, trades at a slight premium to Nvidia (Nvidia trades at 36x forward earnings).

Amazon's strength across e-commerce and cloud computing as well as its investment in AI makes it a business that's well diversified -- meaning it's high growth, yet doesn't come with as much risk as a company that's more dependent on selling AI products or services.

Don't get me wrong -- Nvidia still is an attractive stock for many reasons. But Amazon offers investors a very complete package, including AI and more, and that makes it a top Magnificent Seven buy right now.