Amazon (AMZN 1.16%) stock has returned dizzying gains for investors over time, and investors are excited that it's up almost 60% this year. But it's actually down about 20% over the past three years, so if you bought within that time frame, you might still be sitting on a loss. But the stock is moving in the right direction.

Let's see if Amazon can replicate some of its past successes and if it should make it onto your buy list.

What's going right

After a challenging 2022, things are looking brighter overall for Amazon. It's maintaining strong growth rates while navigating inflation and improving profitability, and it's making progress with some of its newer businesses. 

Besides cutting 27,000 jobs, the company restructured its distribution network from a national to a regional focus in late 2022. Each of the eight distribution centers has a broad selection of merchandise that can get out to customers faster, and Amazon recorded its fastest-ever delivery times in the second quarter of 2023. Amazon uses artificial intelligence in many parts of its business, and it enhances the fulfillment network with robust analytics that get products to customers through the quickest and cheapest routes. 

An area that's emerged as a growth lever is advertising, which is one of the fastest-growing of Amazon's segments. Advertising sales increased 22% over last year in the second quarter, and this is another area where it uses its robust artificial intelligence capabilities to offer more to clients.

Amazon probably has more customers than any other e-commerce company, giving it billions of data points to create targeted ads as well as offering advertisers the most exposure for their money. 

The fastest-growing category in the second quarter was the "other" segment, which includes video licensing and distribution, healthcare, shipping services, and co-branded credit card partnerships. This is the smallest of the segments, with $1.3 billion in second-quarter sales, but it grew 26% over last year.

Amazon has operated a healthcare business since 2018, beginning with Amazon Pharmacy and extending into telehealth services. It made a bigger splash with its acquisition of One Medical last year for $3.9 billion, and so far, it remains a small piece of the company.

However, in Amazon style, the company is going for a much bigger piece of the healthcare pie, and it inked a deal with insurance company Blue Shield in California last week to be its home medication delivery partner. Look for Amazon to break out healthcare into its own category as it grows. 

What's going wrong

At this point, there's little going wrong. One could argue that growth is slowing at Amazon Web Services (AWS), but investors haven't been put off by that. It's still the leading cloud computing company, with 32% of the market share.

Sales increased 12% year over year in the second quarter, a ways off from the more than 30% it was steadily increasing per quarter prior to inflation. But Amazon is upgrading its platform with services like Code Whisperer, a generative AI-powered solution for using prompts to code and save time and money for clients.

It's also ceding some market share to its smaller competitors. Microsoft's Azure increased 32% over last year, and Alphabet's cloud computing service increased 28%. This is something to watch, but given Amazon's lead, it's not worrisome right now.

E-commerce has also slowed, but it has stabilized, and sales were up 11% year over year in the second quarter, beating internal estimates. Investors weren't thrilled with last year's low increases after hitting more than 40% at the height of the pandemic, but now they're getting comfortable with this new normal.

Amazon stock is looking good right now

Putting it all together, Amazon is well-positioned to harness its strengths and keep up its growth. At this price, shares trade at 2.6 times trailing-12-month sales, which is close to its lowest in five years and reasonable considering its opportunities and performance. That makes Amazon a buy right now.