AutoZone's stock surged 40% in the last year. Here's how it's thriving in the era of Amazon

Why Amazon can't keep up with AutoZone

Auto parts retailer AutoZone is one of the lucky, or clever, retailers that has managed to fend off attacks from e-commerce giants such as Amazon.

As many once-legendary names in different retail sectors struggle with cheap online competition, some investors say AutoZone is actually poised for growth.

The retailer has stayed relevant by focusing on having on hand just about any kind of part a customer might need for any kind of car and training staff to answer customer questions that can range to the highly specific. Store staff are trained to help customers avoid highly risky mistakes — such as choosing the wrong type of brake pad. They are even known to help with some installation work, like fitting new wipers on a windshield.

That kind of personalized customer service is difficult for online competitors, and even large retailers like Walmart, to imitate.

Investors have noticed. Shares of AutoZone have risen by roughly 40% in the last 12 months, closing at $1,166 a share on Thursday. By comparison, Amazon and Walmart shares have risen by about 14% and 18%, respectively, over the last 12 months.

AutoZone has helped boost its stock price, in part, by buying back its own stock for nearly two decades.

But growing its small business serving professional mechanics and body shops is beginning to yield fruit.

While AutoZone has been regarded by many investors as a best-in-class player in auto parts retail, it has historically focused heavily on serving the "do-it-yourself" customer and home mechanic. About 80% of its revenues comes from DIY shoppers.

In recent years, the company has invested in building a network of large distribution centers and training staff to develop relationships with mechanics. Parts delivery is also crucial; mechanics often expect an ordered part to be delivered rapidly, about as quickly as one might expect a pizza.

"What's been driving this stock the last really 18 months since 2018 has been the growth in that commercial business," said Stephens analysts Daniel Imbro. "That 20 percent of the AutoZone's revenue has been outpacing the industry pretty meaningfully on an organic basis. And I think that's actually been the bigger driver of stock."