Nvidia (NVDA 6.18%) has undoubtedly led the first phase of the artificial intelligence (AI) boom. Its share price soared 245% over the past year as businesses clamored to buy its graphics processing units (GPUs), chips that have become synonymous with AI. But analysts at Goldman Sachs see Amazon (AMZN 3.43%) as a leader in the second and fourth phases of AI, and Cloudflare (NET 1.44%) as a leader in the third phase.

The four phases are detailed below. Investors should not think of them as distinct events, but rather as a continuum where a new phase can begin well before the previous one has ended. In other words, all four periods will overlap to some degree.

  • Phase 1: Semiconductor companies will generate revenue from chips designed to support AI workloads.
  • Phase 2: Cloud businesses will produce revenue by providing access to AI infrastructure.
  • Phase 3: Cloud companies will generate revenue by incorporating AI into software and services.
  • Phase 4: Many different kinds of organizations will use AI internally to improve operational efficiency.

The Goldman analyst team has made sensible selections. Amazon is the largest cloud services provider in the world and the company is already using AI to make its logistics business more efficient. Similarly, Cloudflare has a substantial opportunity to monetize AI through its Workers developer platform, so much so that management believes it could be a leader in AI inferencing.

Read on to find out why both stocks could be worthwhile long-term investments.

1. Amazon

Amazon is best known for its e-commerce empire. The company operates the most visited online marketplace in the world, and it has reinforced its leadership position by investing heavily in logistics capabilities. That strategy not only allows Amazon to control costs, but also enables the company to support sellers with fulfillment services and delight buyers with timely delivery.

Meanwhile, Amazon has used its dominance in online retail to create a thriving advertising business. In fact, Amazon has become the third-largest adtech company in the world, and Wedbush Securities analyst Scott Devitt believes it "is well positioned to continue taking share of global digital advertising spending over a multi-year period."

Finally, Amazon Web Services (AWS) is the top dog in cloud infrastructure and platform services, and it has achieved a strong presence in several subcategories of the cloud computing market. Most notably, consultancy Gartner recently recognized AWS as a leader in artificial intelligence (AI) developer services.

Amazon looked strong in the fourth quarter. Revenue increased 14% to $170 billion due to momentum in e-commerce and advertising, as well as a sequential acceleration in cloud computing revenue. Meanwhile, GAAP net income reached $1.00 per diluted share, up from $0.03 per diluted share in the prior year, indicating that cost-control efforts are paying off.

Looking ahead, AI should be a tailwind for Amazon, both in terms of improving efficiency and boosting revenue. For instance, the company is using machine learning to optimize inventory and delivery routes. That should support continued margin expansion, especially in conjunction with its new regional fulfillment strategy, which reduced shipping costs on a per-unit basis in 2023 for the first time since 2018, according to CEO Andy Jassy.

Meanwhile, Amazon recently introduced Bedrock, a cloud service for building generative AI applications. The company also announced Amazon Q, a generative AI business assistant. Both products create new monetization opportunities that should help Amazon tap growing demand for AI. Indeed, Jassy believes investments in AI will "drive tens of billions of dollars of revenue for Amazon over the next several years."

Going forward, Wall Street analysts expect Amazon to grow revenue by 11% annually over the next five years. That estimate makes its current valuation of 3.2 times sales seem reasonable, though it is a slight premium to the three-year average of 2.9 times sales.

I think Goldman has the right idea where Amazon is concerned. Patient investors should consider buying a few shares of this top AI stock today.

2. Cloudflare

Cloudflare provides application, network, and security services that improve the performance of corporate infrastructure and software across public clouds and private data centers. Additionally, the company offers compute and storage services through its Workers developer platform that help businesses build and deploy applications, and it has been particularly focused on enabling artificial intelligence.

Last year, CEO Matthew Prince said, "By our estimates, Cloudflare is the most commonly used cloud provider across leading AI start-ups." He also stated that the company was "uniquely positioned to become a leader in AI inferencing." Prince was referring to Workers AI, a recently launched service that lets businesses run AI applications on Nvidia GPUs installed across its network.

Cloudflare operates the fastest cloud network on the market, and Forrester Research recently recognized the company as the leader in edge development platforms. Those qualities could indeed help Cloudflare become a major player in the AI inferencing market, despite tough competition from Amazon and Microsoft.

Cloudflare reported strong fourth-quarter financial results. Its customer count climbed 17% and the average existing customer spent 15% more over the past year. In turn, revenue increased 32% to $362 million in the fourth quarter, and non-GAAP net income more than doubled to $53 million. Investors have good reason to think that momentum will continue

Going forward, Grand View Research believes the edge computing market will grow by 37% annually through 2030, and Cloudflare is poised to capitalize on that opportunity given its strong position in edge development platforms. But the International Data Corp. has also ranked Cloudflare as a leader in zero-trust network access, and that market is forecast to expand by 17% annually through 2030.

Collectively, Cloudflare has a good shot at 20% annual revenue growth through the end of the decade, and that estimate could be conservative depending on how well the company monetizes AI. Either way, its present valuation of 23.7 times sales is tolerable. To be clear, that multiple is not cheap, so shares will almost certainly be volatile. But patient investors comfortable with that risk should consider buying a small position in this growth stock.