Amazon (AMZN -1.01%) has posted solid gains this year -- up around 30% -- and over the long term thanks to its leadership in the high-growth markets of e-commerce and cloud computing. The company, known for bringing in billions in revenue and profit, even showed that it has what it takes to recover and grow after traveling through tough times: Higher interest rates and the general economic situation drove the company to a loss in 2022, but Amazon revamped its cost structure to turn things around -- and then roared back to growth last year.
All of this sounds fantastic, but the gains also have driven up Amazon's valuation -- and it's important to remember that today, at a market cap of more than $2 trillion, Amazon is less likely to quickly double or triple in value than a younger, less-expensive growth stock.
Considering this picture, should you buy, sell, or hold Amazon stock? Let's find out.

Image source: Getty Images.
The case to buy or hold
As mentioned, Amazon has built a leading position in both e-commerce and cloud computing -- and the good news is this is likely to last. In e-commerce, Amazon has a moat, or competitive advantage, and this is the company's extensive infrastructure, allowing it to fulfill most of your shopping needs, at often the best prices around.
You know that you'll find most of what you need on Amazon, and the company has the fulfillment network to deliver the order to you, sometimes in a matter of hours. Amazon continues to add features to its Prime subscription service and is set to host its 10th Prime Day sales event next week. The e-commerce giant doesn't regularly report its number of Prime members, but as of early 2021, the company said it had more than 200 million worldwide.
With this infrastructure and membership level, Amazon is well-positioned to benefit from future e-commerce growth.
As for cloud services, Amazon is the No. 1 provider worldwide, and the company's investments in artificial intelligence (AI) should broaden this massive revenue stream. Prior to the AI boom, Amazon Web Services (AWS) already was Amazon's biggest profit driver, and now, with the addition of various AI services for customers, AWS has reached a $100 billion annual revenue run rate.
All this adds up to major potential for growth ahead, meaning it's a great idea to buy Amazon stock or hold on to the shares you already own.
The case to sell
Amazon's earnings growth over time hasn't gone unrewarded. Investors have piled into the shares, leading the stock to a more than 1,100% gain over the past decade.
But this has driven up valuation. Amazon shares today trade for 43x forward earnings estimates. This isn't Amazon's highest ratio in the recent past -- it traded for more than 50x late last year -- but it isn't the lowest either. Earlier this year, you could have picked up shares of Amazon for just a little more than 30x forward earnings estimates.
It's also worth noting that Amazon is expensive compared to rival cloud companies, Microsoft and Alphabet.
AMZN PE Ratio (Forward) data by YCharts
These companies, too, are investing heavily in AI and should benefit as the market develops -- so investors may opt to buy these stocks as a way to bet on AI growth. That, and growth investors' quest to find new higher-growth players, could weigh on Amazon's potential for gains in the months to come and even beyond.
All this means investors who have held Amazon for a while and reaped rewards may consider selling their shares.
So what's the best decision -- buy, sell, or hold?
The best decision depends, in part, on your investment strategy. For example, if you've held Amazon shares for many years and need funds to invest in other stocks, you may consider reducing your position. This will help you access new opportunities and further diversify your holdings.
But if you don't necessarily need to free up funds for investing, I favor holding on to Amazon stock right now -- and even buying shares. Yes, Amazon trades at a premium compared to cloud rivals, but this company's earnings successes across two major businesses -- and the fact that its market position sets it up for more long-term earnings growth -- mean it's worth the price.