Amazon (AMZN 0.01%) stock has gained a staggering 190,400% over its lifetime. If you would have invested $1,000 when it first went public, you'd have more than $1.9 million today.

That was close to 30 years ago. Could it be that investing in Amazon today is a once-in-a-generation opportunity? Let's see why it could be.

Winners keep on winning

Investors looking for the next big thing can sometimes miss the outstanding opportunity right in front of their eyes. Many a shareholder has regretted selling too soon because a stock had already become a multi-bagger.

Amazon may have already delivered life-changing gains, but it could continue to be a stellar stock to own for the foreseeable future. I qualify that by saying that it would be nearly impossible for it to repeat the same gains it's made until now, but it still has incredible prospects to be a market-beating stock long term.

It's a master of developing new businesses, which is why it's such a sure bet for growth. In the past, it was e-commerce, and then cloud computing. It has become the dominant company by far in both of these areas, with a lead so wide, especially in e-commerce, that it would be difficult to unseat in the near future. Total sales increased 10% year over year in the second quarter, and Amazon Web Services (AWS), the cloud-computing segment, accelerated to a 19% sales increase. There are plenty of tailwinds for both businesses as well.

Amazon has several smaller businesses that are growing fast, specifically advertising, and today the tailwinds are coming from the artificial intelligence (AI) revolution. CEO Andy Jassy said, "I don't know if any of us have seen a possibility like this in technology in a really long time, for sure, since the cloud, perhaps since the Internet." Although it's still in its infancy, the generative AI business already has a multi-billion-dollar revenue run rate.

Management sees its advantage in its flexibility. Its feedback suggests that customers are looking for options, not a one-size-fits-all approach. They want customization, and they're also looking for solutions that compete on price. Amazon is developing its own chips to meet these demands. It already offers a large array of services and customization levels to match all needs, and Jassy said that it "launched more than twice as many machine learning and generative AI features into general availability than all of the other major cloud providers combined."

Once in a generation?

OK, so Amazon is leveraging its top AI platform to feed into a perhaps trillion-dollar market, and it has tons of opportunity in its legacy segments. But why is it once in a generation?

For that part, let's turn to Amazon's valuation. Amazon stock is trading at its lowest P/E ratio in more than a decade.

AMZN Chart
AMZN PE Ratio data by YCharts.

From the last time Amazon traded around this level (in 2010) until now, Amazon stock has gained more than 3,000%.

A low valuation can mean a few things. Often it's an indication that the market doesn't see much of a future for the stock. Another is that the market views it as risky. A third could be the market expects growth for well-established companies to slow down.

In Amazon's case, the stock dropped after Amazon's second-quarter report. It's guiding for revenue slightly lower than the average analyst estimate of $157 billion.

But the P/E ratio has been dropping over the past year. There's a clear market pessimism here despite Amazon's mostly strong performance and opportunities. With lower interest rates expected to come and a stronger economy to follow, Amazon has positioned its business well to ultimately overcome market pessimism. And since it has a history of springing surprises, Amazon stock could be undervalued right now. That's why this looks like a potentially solid opportunity that investors might not see again soon.