Artificial intelligence (AI) revenue will total $1.2 trillion by 2027, according to a recent report from UBS Global Wealth Management. What's more, UBS analysts believe "AI will be the most profound innovation and one of the largest investment opportunities in human history."

The report breaks the investment opportunity into three layers, as detailed below.

  1. The enabling layer includes semiconductor companies and cloud services providers. Revenue at this layer is estimated to reach $516 billion in 2027.
  2. The intelligence layer includes software companies that provide pretrained models and data solutions. Revenue at this layer is estimated to reach $255 billion in 2027.
  3. The application layer includes software companies that use models and data to build finished products. Revenue at this layer is estimate to reach $395 billion in 2027.

To be clear, the layers are not mutually exclusive, and those estimates explain how UBS believes the AI market will evolve over the next three years. Ultimately, the application layer may create the most economic value, but analysts "see the largest near-term opportunities in the enabling layer."

Nvidia (NVDA -0.66%) and Amazon (AMZN -1.83%) fit into that category. Here's why both stocks are worthwhile investments.

Nvidia: The market leader in artificial intelligence chips

Nvidia crushed expectations with its first-quarter financial report. Revenue increased 265% to $22.1 billion on strong sales growth in the data center segment driven by demand for artificial intelligence (AI) hardware. Meanwhile, non-GAAP net income increased 486% to $5.16 per diluted share. Importantly, while Nvidia cannot maintain triple-digit growth indefinitely, the company has very compelling growth prospects.

Nvidia graphics processing units (GPUs) are the industry-standard in accelerated computing, especially where artificial intelligence workloads are concerned. Its market share in AI chips falls somewhere between 80% and 95%, according to analysts. And a recent report from Forrester Research stated that "Nvidia sets the pace for AI infrastructure worldwide. Without Nvidia GPUs, modern AI wouldn't be possible."

Importantly, Nvidia participates in other areas of the AI economy. Its portfolio includes adjacent data center hardware like server central processing units (CPUs) and networking equipment, as well as complementary software and services that streamline application development. In short, Nvidia is not simply a semiconductor company, but rather a full-stack accelerated computing company that has wisely positioned itself as a one-stop shop for AI.

Goldman Sachs analyst Toshiya Hari sees that as an important differentiator. "We believe Nvidia will remain the de facto industry standard for the foreseeable future given its competitive advantage that spans hardware and software capabilities," he told clients. "Nvidia's annual introduction of new products and platforms sets a pace of innovation that keeps it at the forefront of the industry."

Nvidia shares have declined about 13% in the last week, and the stock now trades at 69 times earnings. That multiple looks fairly reasonable given that Wall Street expects Nvidia to grow earnings per share at 33% annually through fiscal 2028 (ends January 2028). I am not saying the stock is cheap, but Nvidia is probably the most straightforward way to invest in the "enabling layer" of AI.

To quote a recent report from Argus, "We believe that most technology investors should own [Nvidia] in the age of deep learning, AI, and GPU-driven applications acceleration."

Amazon: The market leader in cloud infrastructure services

Amazon reported solid financial results in the first quarter. Revenue increased 13% to $143 billion on accelerating sales growth across advertising and cloud services. Meanwhile, GAAP net income tripled to reach $0.98 per diluted share as cost control efforts continued to bear fruit, especially the regionalization of its fulfillment network.

Investors have good reason to think Amazon can maintain that momentum given its strong position in three large markets. Specifically, Amazon operates the most-visited online marketplace, it is the largest retail advertiser in the U.S. and the third largest ad tech company worldwide, and Amazon Web Services (AWS) is the global leader in cloud infrastructure and platform services.

That last point is particularly important. Cloud spending is expected to grow at 21% annually through 2030, due in large part to demand for AI services. AWS is well positioned to benefit given its industry leadership. What's more, Morgan Stanley recently surveyed CIOs to ascertain which public clouds were most likely to gain share over the next three years, and Microsoft and Amazon topped the list.

However, Amazon is not simply relying on its market leadership to bring more workloads to AWS. The company has also introduced new products that extend its ability to monetize AI. Amazon Bedrock is a cloud service that streamlines the development of generative AI applications, and Amazon Q is a conversational assistant that helps software developers work more productively.

Going forward, Wall Street expects Amazon to grow earnings per share at 26% annually through 2027. That makes its current valuation of 52 times earnings look reasonable. Patient investors should feel confident buying this growth stock today, especially when 95% of analysts following Amazon rate the stock a buy, and its median price target of $220 per share implies 20% upside.