The euphoria surrounding artificial intelligence (AI) is in full swing. Both the S&P 500 and Nasdaq Composite indexes are trading near record levels, and many on Wall Street are anticipating further gains.

Among the hottest names in AI are the "Magnificent Seven" stocks -- a catchy moniker used to collectively describe megacap behemoths Microsoft, Alphabet, Nvidia, Apple, Meta Platforms, Tesla, and Amazon (AMZN 0.74%).

Microsoft and Nvidia have been identified as two early darlings in the AI revolution. But e-commerce and cloud computing leader Amazon has quietly made some notable progress of its own.

Brian Nowak of Morgan Stanley recently raised his price target for Amazon stock to $215 -- implying roughly 15% upside as of market close on April 10.

Let's break down why now could be a terrific opportunity to scoop up shares of Amazon.

Cash flow is king

The last couple of years have been challenging for Amazon. The macroeconomy has been plagued by unusually high inflation, causing the Federal Reserve to enforce a number of aggressive interest rate hikes.

The combination of lingering inflation and rising borrowing costs had a meaningful impact on both consumers and businesses. As a result, Amazon's e-commerce and cloud software businesses witnessed stalling growth as corporations and consumers reined in spending.

Nevertheless, Amazon's management adjusted and proved that the company can thrive even during more daunting economic periods. During 2023, inflation began to cool while artificial intelligence (AI) became all the rage in the tech sector.

Amazon's growth began to accelerate again -- but it was the company's profitability profile that really shined.

Amazon's free cash flow.

Image source: Amazon Investor Relations.

In 2023, Amazon generated a jaw-dropping $36.8 billion in free cash flow, which is what's left over from cash flow after operations expenses and capital spending This is quite a turnaround considering that the year before, Amazon burned $11.6 billion of cash.

The most encouraging part about Amazon's consistent and compounding cash flow is that it comes from different sides of the company's business.

Amazon buckets its online and physical stores as well as its advertising businesses into geographic categories called North America and International. In 2023, the combined operating income for these segments was $12.2 billion -- a major reversal from a combined operating loss of $10.6 billion in 2022.

But it was Amazon's cloud business that really helped reignite the company's return to profitability. Sales in Amazon Web Services (AWS) increased 13% year over year in 2023 to $90.6 billion while boasting an impressive 27% operating margin.

Amazon's strong performance in high-growth markets, combined with its robust cash-flow profile, are what make the company stand out among its peers. It's no wonder the company has earned a spot in the portfolios of both Cathie Wood and Warren Buffett.

While there was a lot to celebrate in 2023, Amazon isn't resting on its laurels. Savvy investments in artificial intelligence (AI) could be the key to unlock the company's next phase of supercharged growth.

People analyzing business trends in an office.

Image source: Getty Images.

Artificial intelligence (AI) is an enormous opportunity

Microsoft really kicked off the AI revolution after its investment in OpenAI -- the developer of ChatGPT. The move was the impetus for more aggressive spending in the AI arena from big tech in particular.

Amazon followed Microsoft with its own investment in a competing platform called Anthropic. As part of the deal, Anthropic will use AWS as its primary cloud services provider. This is a huge deal and should not be underestimated. The partnership with Anthropic could spell a new wave of lead generation for AWS and serve as catalyst for accelerated further growth -- on both the top and bottom line.

Additionally, Anthropic will also be using Amazon's in-house Trainium and Inferentia chips to develop and enhance its generative AI models. This is a subtle opportunity that investors should keep an eye on. For now, the semiconductor market is dominated by Nvidia and Advanced Micro Devices.

However, Amazon's foray into the chip market could be a lucrative opportunity in the long run as the company seeks to disrupt several facets of the AI realm.

A magnificent valuation

The chart below benchmarks the Magnificent Seven stocks on a price-to-sales (P/S) basis. Amazon's P/S of 3.4 is the lowest among this cohort by wide a margin.

AMZN PS Ratio Chart

AMZN PS Ratio data by YCharts

My take is that Amazon's position within the AI landscape is misunderstood. In contrast to Amazon, there are very few companies that can benefit from artificial intelligence (AI) in multiple ways.

Considering Amazon's business spans e-commerce, cloud computing, advertising, and streaming, there are a host of ways for the company to apply AI across its ecosystem. This could lead to a new period of exponential growth in both revenue and profits.

Given Amazon's discounted valuation relative to peers, I think now is a terrific opportunity to scoop up some shares as the secular themes in artificial intelligence (AI) continue to play out.