Artificial intelligence (AI) emerged as the hottest investment theme in 2023. Considering the pace of adoption of AI by enterprises and customers, it appears this is no passing trend. As AI continues to become an integral part of our daily lives, it makes sense to capitalize on this opportunity.

Here's why investors stand to benefit from buying and holding high-quality AI-powered stocks like Nvidia (NVDA 6.18%) and Amazon (AMZN 3.43%) for the next decade.

Nvidia

An uncontested leader in the AI space, Nvidia came out with blowout results in the third quarter of fiscal 2024 (ending Oct. 29, 2023), with revenue and earnings handily surpassing consensus estimates. The company's fourth-quarter guidance is also significantly above analysts' consensus estimates.

Despite this, the stock saw a slight decline due to worries associated with the U.S. government's new and expanded restrictions on exporting AI products above certain performance thresholds (AI chips like the A800 and H800) to China and some other countries. Since these markets contributed nearly 20% to 25% to Nvidia's data center revenue, the company expects to witness a decline in sales in these markets in the fourth quarter of fiscal 2024. However, Nvidia expects the headwind to be offset by solid revenue growth in other regions.

CEO Jensen Huang is anticipating expenditure of nearly $1 trillion by data center operators over the next four years related to upgrades for AI workloads. Since a substantial investment is expected to come from tech giants like Amazon, Alphabet, Microsoft, and Meta Platforms, the market opportunity should be relatively resilient to economic upheavals.

In the third quarter, data center revenue grew by a whopping 279% year over year to $14.5 billion -- mainly driven by strong demand for the NVIDIA HGX platform and InfiniBand end-to-end networking. Combining four or eight of Nvidia's AI GPUs with fast interconnections that can be programmed optimally by AI software, this platform plays a major role in training generative AI models. Nvidia's HGX system has been used to build and run several successful generative AI applications such as ChatGPT, Microsoft's Office 365 CoPilot, Adobe's Adobe Firefly, and ServiceNow's Now Assist. Besides, the increasing adoption of HGX system (bundled hardware) is also helping drive demand for the company's networking solutions.

Nvidia's AI software business further helped build a moat for the company. The company developed a parallel programming platform for general computing on GPUs called the Compute Unified Device Architecture (CUDA) software toolkit. Since CUDA was introduced in 2006 -- far before competitor Advanced Micro Devices launched its ROCm software stack -- it has built a base of over 4 million developers and has been downloaded 40 million times. Since many GPU developers are already comfortable with Nvidia's software ecosystem, the chances of switching to alternative chips and software remain low.

Nvidia is trading at a price-to-sales (PS) ratio of 37.2, far higher than the median semiconductor industry multiple of 2.8. However, the premium valuation seems justified when you consider the company's dominance in the huge data center and generative AI markets. Considering that the demand for AI chips and AI software will continue to rise across new verticals and use cases, Nvidia can prove to be a solid buy-and-hold stock for the next decade.

Amazon

E-commerce and cloud services giant Amazon also came out with a stellar performance in the third quarter of 2023 (ending Sept. 30, 2023), with revenue and earnings crushing analyst estimates. The revenue guidance for the fourth quarter is also above analyst projections. Not surprisingly, the company's stock  gained 74% so far this year. There are many reasons why the stock can continue to grow higher in the coming decade.

A leader in the cloud infrastructure services market, Amazon Web Services (AWS) started seeing the benefit of normalization in cloud spending optimization trends. This was apparent in AWS' third-quarter revenue, which grew 12% year over year to $23.1 billion. The company also saw an acceleration in cloud deal volumes in September and October.

Amazon is now striving to make AWS a dominant player in the generative AI space. The company has been working on developing custom AI chips, Trainium and Inferentia, for generative AI applications. Amazon also invested nearly $4 billion in the AI start-up Anthropic. As a part of the collaboration, Anthropic will use AWS as a primary cloud provider and Trainium and Inferentia chips to build, train, and run its foundational AI models. Amazon recently launched Amazon Bedrock, which makes large language models from Amazon, Meta Platforms, Anthropic, and other third-party providers, available to its AWS customers.

Amazon's e-commerce business is also seeing significant improvement, thanks to the company's strategy to change from a single national fulfillment network to eight regionalized fulfillment networks. The regionalization strategy has helped lower costs and improve delivery times.

Despite the many pros, Amazon is trading at a P/S ratio of 2.7, even lower than its 10-year average P/S ratio of 3.

Considering the stabilization trends in the cloud business, robust progress in the generative AI business, improving e-commerce business, and a reasonable valuation, Amazon is a solid pick for the next decade.