Amazon (AMZN -0.61%) hasn't exactly been one of the market's star performers in recent years. Its stock is up just over 30% during that stretch, while shares of cloud computing rivals Microsoft and Alphabet have more than doubled, as have those of retailers Walmart and Costco.
However, that underperformance isn't reflective of what has been going on under the hood at Amazon. The lackluster returns are more likely due to a previously elevated valuation, as well as selling pressure from founder Jeff Bezos and his ex-wife, who have been dumping shares.
An e-commerce giant
Amazon hasn't been sitting idly by for the past five years resting on its laurels, and it has made big changes within its e-commerce operations. During this time, the company spent heavily on logistics, automation, artificial intelligence (AI), and robotics, and now that spending is paying off.
The company runs one of the world's most advanced fulfillment systems, powered by its DeepFleet AI model that coordinates more than a million robots across its warehouses. These machines do a lot more than move boxes from one place to another. Some can detect damaged products before they're sent out, which reduces costly returns, while others can even repair themselves to keep operations running smoothly.
It's also using AI across its logistics network to help determine which warehouses stock which items, and how deliveries are best routed. It's helping delivery drivers find hard-to-locate drop-off locations in places like large apartment complexes. This all helps reduce costs and speed up delivery times.
Advertising is another key piece in the company's story, and another place where it is using AI. Amazon has become one of the largest digital advertisers on the planet, behind only Alphabet and Meta Platforms, so this is not a small business. Not only is it increasing quickly, but it also carries higher gross margins than its core e-commerce operations.
Amazon is using AI to make ad placements more effective, and advertisers are seeing better results. This led to ad revenue jumping 23% last quarter to $15.7 billion.
Between increased e-commerce efficiency and its growing high-margin sponsored ad business, Amazon is starting to see strong operating leverage in its e-commerce business. In the second quarter, North America operating income rose 47% to $7.5 billion on just an 11% increase in revenue to $100.1 billion. That's the kind of operating leverage that can help drive strong earnings increases for years.
The cloud and beyond
While Amazon's retail operations are humming along, cloud computing remains its biggest growth driver. Its cloud unit, Amazon Web Service (AWS), increased revenue by 17.5% last quarter to $30.9 billion, while operating income rose 10% to $10 billion.
Cloud computing has been central to the rise of AI; companies are using the services and infrastructure of these providers to build out their own AI models and apps. As the market share leader, Amazon is right in the thick of this boom.
The company offers customers a number of foundational large language models (LLMs), including those from Anthropic, which Amazon has invested in, through its Bedrock solution, while its SageMaker platform can help companies build their own models from scratch.
AWS is also expanding into new tools like Strands and AgentCore that help companies build AI agents. Amazon has even developed its own custom Trainium and Inferentia AI chips to help lower costs.
Besides cloud computing, Amazon also has some interesting emerging bets. The most intriguing is Project Kuiper, a satellite broadband network that it's building to deliver high-speed internet around the world. Right now, it has just over 150 satellites in orbit, with plans to get to around 3,200. That's a huge undertaking, but one that could pay off big in several years.
Time to buy the stock
Amazon's stock is not risk-free. The company is spending heavily on new data centers to meet AI demand, and if growth slows, that spending could weigh on margins. Competition in both cloud computing and retail remains intense, and a weaker economy could pressure sales. That said, it has seen those challenges before and come out stronger.
Meanwhile, the stock is trading at one of the most attractive valuations in its history, with a forward price-to-earnings ratio (P/E) of roughly 28 times next year's earnings estimates. That's lower than many traditional retailers like Walmart and Costco, even though Amazon has more potential than both of them.
As such, for investors thinking about where to put $1,000 right now, Amazon is great choice given its combination of growth potential and attractive valuation. In fact, I recently started a position in the stock myself.