It's clear that recent advances in artificial intelligence (AI) will impact the world in ways we can't yet imagine. One company that's been at the forefront of AI for decades is Amazon (AMZN 0.18%), and the company has no intention of ceding its advantage

The stock is up 82% over the past year, reaching an all-time high on April 10, but one Wall Street analyst believes Amazon still has room to run.

Central to the AI revolution

DA Davidson analyst Gil Luria maintained a buy rating on Amazon stock while boosting his price target to $235, which represents potential upside for investors of roughly 26% compared to Wednesday's closing price. The analyst believes Amazon Web Services' (AWS) data center investments and custom AI chips position the company well to profit from generative AI, and Amazon's retail profits are poised to rebound.

The analyst goes even further, calling Amazon his "favorite mega-cap" stock.

Betting heavily on the AI wild card

The analyst's conclusion makes perfect sense to me. Amazon is reportedly planning to invest $150 billion over the next 15 years on data centers. This will give AWS a critical edge as it rolls out a growing suite of cloud tools to claim its share of the booming AI market.

Generative AI is expected to generate between $2.6 trillion and $4.4 trillion of value for the global economy in the coming years, according to a study from the McKinsey Global Institute. A good chunk of that will come via cloud services, including AWS.

Furthermore, a quick look at Amazon's results reveals that year-over-year net sales growth has accelerated in each of the past four quarters, while profitability continues to climb. This is a clear indication the retail drought is over and Amazon's previous cost-cutting efforts are bearing fruit.

Finally, trading at 3 times forward sales estimates, Amazon offers investors plenty of AI-powered upside for an attractive price, especially compared to its "Magnificent Seven" peers. That's why the stock is a buy, even at an all-time high.