Investing icon Warren Buffett built his legend around decades of market-beating value picks. His strategy has changed in recent years, giving a few high-growth tech stocks a place at Berkshire Hathaway's (BRK.A 0.00%) (BRK.B -0.04%) elite table.

You might think I'm here to recommend Apple (AAPL 3.18%), which is the largest holding in Berkshire's portfolio nowadays. Close, but no cigar. I have nothing but respect for the iPhone maker, but its revenue growth has stalled out since 2022, and even Buffett sold 10 million Apple shares last year. The stock still accounts for nearly 42% of Berkshire's stock holdings, but I'm more interested in one of his smaller tech bets.

That would be Amazon.com (AMZN 0.45%). The e-commerce retailer and cloud computing pioneer represents just 0.5% of Buffett's stock holdings, and the position is only five years old. However, Buffett is kicking himself for not getting into Amazon earlier -- and it's still one of the most promising tech stocks in today's market.

If I were starting a long-term portfolio today, Amazon would be one of the first stocks I'd consider. You can buy Amazon shares today, put them under your proverbial pillow, and let them gain value for years or even decades to come.

Amazon's recent roller-coaster ride

The king of e-commerce in the coronavirus lockdown era lost a step when the inflation crisis started. Amazon's pandemic-inflated sales growth slowed down to a crawl in 2022. At the bottom of that downturn, the company saw $30 billion of negative free cash flow in a single year.

Wall Street's reaction was brutal. At the start of 2023, Amazon's stock had fallen 56% from its all-time peak.

I hope you were buying Amazon shares a year ago. As it turns out, the company was busy setting itself up for renewed growth in a healthier economy. Moreover, OpenAI had just kick-started the artificial intelligence (AI) frenzy that's expected to power the tech sector for the foreseeable future, with Amazon Web Services (AWS) positioned as a leading platform provider.

Of course, it wasn't obvious in 2022 that generative AI tools were about to turn the tech sector upside down. The inflation-fighting moves seemed more painful than effective at the time. And Amazon was still burning a ton of cash, adjusting to a weaker retail business and an overly enthusiastic infrastructure expansion during the coronavirus pandemic.

Still, Amazon always seems to have the right answer for any challenge. Today, its annual free cash flow stands at an all-time high of $32 billion, and year-over-year sales growth has returned to double-digit percentages.

Amazon's stock is also sniffing around record levels again after a two-year retreat. Shares aren't cheap, trading at 64 times trailing earnings and 59 times free cash flow, but I wish I had a dollar for every time people called Amazon "overvalued" in its market-stomping three-decade history.

From overvalued to invaluable

Already one of the world's largest and most valuable businesses, Amazon still has a lot of room to continue growing. The AI boom is one active catalyst, along with a vast amount of untapped international opportunity and the fact that old-school brick-and-mortar stores still control 85% of retail activity even in the U.S. market. Amazon's e-commerce muscle can flex much further.

You shouldn't put all your nest eggs in the Amazon basket, but the stock belongs in any diversified investment portfolio with an eye toward above-average growth prospects. Warren Buffett wishes he had bought Amazon shares earlier, but it's not too late to jump aboard this long-term growth train.