Amazon and Alphabet have fast-growing cloud computing segments and strong core businesses.
In addition, Amazon and Alphabet's custom chip businesses give them an edge.
Any slowdown in AI spending would lead to strong free cash flow for both companies.
If I were going to buy two "Magnificent Seven" stocks and hold them for the rest of the decade, my choice would be easy. I'm buying Alphabet (NASDAQ: GOOGL) (NASDAQ: GOOG) and Amazon (NASDAQ: AMZN). The two companies actually have a lot in common, as they are two of the world's largest cloud computing providers. Over the next several years, I think these are the type of AI stocks to own.
The pick-and-shovel providers of AI infrastructure, like Nvidia, have clearly dominated the early phase of AI. Right now, there is a rush to build out AI data centers, which has driven huge demand for chips, networking, and other components. However, as the market starts to mature, the large cloud providers, such as Alphabet and Amazon, will be the best positioned.
Missed AI’s "Act 1"? Act 2 Could Be 15x Bigger. Most investors think they missed the AI boat because they didn't buy Nvidia in 2005. But according to our analysts, we’re only at the end of "Act 1"—the R&D phase. "Act 2" is the global rollout. Continue »
The reason is simple: The big cloud computing stocks can win in both a high-spending environment and a slow-spending one. Right now, both Amazon and Alphabet are getting strong returns on their AI infrastructure spending. Amazon has said it is signing five-year or longer contracts and getting a payback within two to three years, with chips having about a six-year useful life.
Meanwhile, Alphabet is getting a payback in around two years, and in half that time when it uses its own tensor processing units (TPUs). With these types of returns getting locked in, it makes sense to invest as much as possible into building out AI infrastructure.
However, the companies also win when demand starts to slow. In that scenario, Amazon and Alphabet can cut back on their AI infrastructure capex, which in turn will lead to huge free cash flow generation. They will then be able to quickly pay off any debt associated with their AI investments or start buying back stock. In essence, they are in a win-win scenario.
Amazon and Alphabet are also in a strong position due to their custom chip businesses. Over the long term, they should be able to achieve much better returns than providers that rely on Nvidia GPUs, like neoclouds or SpaceX. Alphabet is already starting to see this, and Amazon should see better returns as its custom chips become a bigger part of its business.
Image source: Getty Images.
In addition to their fast-growing cloud computing segments, both Alphabet and Amazon have strong core businesses that generate substantial cash flow to fund their AI infrastructure build-outs.
Alphabet, of course, is the world's search leader with Google Search. As search and AI chatbots blend together, Alphabet is in an enviable position because it controls the distribution. By owning the world's leading browser and smartphone operating system, together with a revenue-sharing deal with Apple to be the default search engine on its devices, Alphabet is the de facto gateway to the internet.
Meanwhile, it has incorporated its top-tier Gemini AI model into its search solution with features like AI Overviews and AI Mode, which bring AI to consumers without them having to change their normal routines or open a separate app.
By having its own chips, Alphabet is also able to train its AI models more cheaply than competitors. At the same time, its vast ad network allows it to monetize consumer AI better than newer start-ups, giving it a significant overall advantage in the space.
Amazon, meanwhile, remains the world's largest e-commerce provider. The business continues to see strong sales, and Amazon is also pushing into new areas to drive growth. Meanwhile, the company's investments in robots, where it is the world's largest manufacturer, and AI have created tremendous efficiencies, which have led to strong operating leverage in its e-commerce operations.
Both Alphabet and Amazon have multiple avenues to be AI winners, making them my top Magnificent Seven stocks to own for the long term.
Before you buy stock in Alphabet, consider this:
The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and Alphabet wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.
Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you’d have $380,363!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you’d have $1,315,732!*
Now, it’s worth noting Stock Advisor’s total average return is 919% — a market-crushing outperformance compared to 211% for the S&P 500. Don't miss the latest top 10 list, available with Stock Advisor, and join an investing community built by individual investors for individual investors.
See the 10 stocks »
*Stock Advisor returns as of October 19, 2026.
Geoffrey Seiler has positions in Alphabet and Amazon. The Motley Fool has positions in and recommends Alphabet, Amazon, Apple, and Nvidia. The Motley Fool has a disclosure policy.