Amazon (AMZN -4.97%) has been a bit of a disappointment for investors lately. Its stock has gained just 34% over the past five years, significantly trailing the S&P 500 index's 90% returns.
But despite its mediocre returns, there's still a lot to like about what Amazon's doing right now and where the company is headed. Here are a few reasons why the company could still be a good long-term investment and whether Amazon stock could set you up for life.

Image source: Amazon.
1. It's making big investments in AI
Amazon Web Services (AWS) is the leading public cloud computing company with 30% market share, compared to Microsoft's 20% and Google's 13%. Microsoft has made some gains on Amazon over the past few years, but Amazon is making some very large investments in artificial intelligence to stay on top.
Recently, the company spent $34 billion in the second quarter on capital expenditures, mostly for expanding its cloud business, and analysts estimate it could spend up to $100 billion this year. The key to staying ahead in the AI race right now is investing a lot of money to build the most advanced data center infrastructure, and this spending could help Amazon outpace the competition.
And it will likely be money well spent, considering that AWS has an operating margin of 33% and generated $10.2 billion operating income in Q2. Not only that, but global AI cloud computing revenue is estimated to reach $2 trillion by 2030, giving Amazon a lot of potential to expand further into this space.
2. It's still the e-commerce king
Amazon has more e-commerce competition than ever, yet the company has maintained its dominant position. Amazon enjoys U.S. e-commerce market share of 40%, while rival Walmart takes just 13% and Target barely registers with 2%.
A big part of the company's success comes from its Prime membership subscription, which gives members access to fast and free deliveries, video and music streaming, photo storage, and more. The latest estimates put global Prime membership at 240 million.
Prime members are important to the company because they spend an average of $1,170 annually on Amazon -- more than twice what nonmembers spend, according to Consumer Intelligence Research Partners.
3. Its advertising business continues to impress
Advertising is perhaps one of the most overlooked aspects of Amazon's business, but it's becoming increasingly important, with Amazon's ad sales increasing by 23% in Q2 to $15.7 billion.
To put this in perspective, Amazon is the third-largest advertising company in the U.S. behind Alphabet and Meta Platforms. The company will have an estimated 17% of the digital market next year, up from less than 11% in 2021. Considering that digital ad sales in the U.S. will reach $429 billion by 2029, Amazon's ability to successfully tap into this market could become increasingly important over the next few years.
Will buying Amazon set you up for life?
Amazon's stock has been a huge success for long-term investors, with gains of 2,800% over the past 15 years. But expecting similar results over the next decade or so probably isn't realistic.
Still, that doesn't mean you should avoid adding Amazon to your portfolio. With Amazon still the leading cloud computing player, its investments in AI just beginning, and the company already carving out a niche in advertising, Amazon still has a lot of potential to boost your portfolio in the coming years, even if it doesn't set you up for life.