Shares of Amazon.com (NASDAQ:AMZN) briefly topped $1,000 at the end of May, marking a milestone moment in the tech giant's 1,340% run over the past decade. Some analysts believe that the stock still has room to run, with the highest near-term target at $1,250 per share.

Let's take a look at how Amazon stacks the deck against the competition and why these advantages could last for decades to come.

Amazon's Prime Air cargo jet.

Image source: Amazon.

Amazon's castle is built on a high-margin cloud

Amazon Web Services (AWS), which originated from efforts to scale up Amazon's own IT infrastructure over a decade ago,now provides cloud storage and infrastructure services to major clients like NASA, the Centers for Disease Control, and Netflix (NASDAQ:NFLX).

That growing list of customers has made AWS the largest cloud infrastructure platform in the world. The unit's revenue rose 43% annually last quarter and accounted for 13% of its top line. But on the bottom line, its operating income rose 47% to $890 million -- compared to just $724 million in operating income for the entire company.

That's because AWS' higher-margin business offset a big loss at its international marketplace and weaker operating income growth at its North American marketplace. This structure -- where a higher-margin business supports lower-margin ones -- enables Amazon to expand its e-commerce ecosystem with low-margin and loss-leading investments.

It's all about Prime

The key to expanding that ecosystem is Amazon Prime, which locks in users with discounts, free shipping options, streaming videos, cloud storage, e-books, and other perks for $99 per year. That ecosystem also includes affordable gadgets like the Kindle e-readers and tablets, Echo smart speakers, and Dash buttons.

Back in April, research firm CIRP estimated that the number of Amazon Prime members in the U.S. doubled over the past two years to 80 million. It also claimed that the average Prime member spent $1,300 per year on the site, versus $700 for non-members.

Amazon's Prime Air drone.

Image source: Amazon.

Those figures indicate that Amazon's prisoner-taking strategy works -- and it's something that brick-and-mortar rivals like Wal-Mart (NYSE:WMT) can't fully replicate. Wal-Mart is trying to counter Amazon with heavier investments in e-commerce, free shipping, and curbside pickup options -- but it lacks the other perks that keep Amazon users locked in. CIRP estimates that 85% of Prime members renew their memberships after the first year.

Using brick-and-mortar stores to expand Prime

Over the past year, Amazon opened brick-and-mortar bookstores and a concept grocery store. This initially seems like a step backwards for the e-commerce giant, since its key advantage against brick-and-mortar players is its lack of overhead from running full retail stores.

However, Amazon's brick-and-mortar stores are really big showcases for Prime. If you visit one of its seven bookstores, you'll only get a discount if you're a Prime member -- otherwise, you pay the full list price. Its drive-in grocery pickup locations are also only available for Prime members.

Amazon's brick-and-mortar bookstore.

Image source: Amazon.

Therefore, Amazon's stores are basically exclusive clubs for Prime members, which are designed to pique the interest of non-Prime members and encourage new sign-ups. That's why non-Prime members are given an option to sign up for a new Prime membership when they check out at its new bookstores.

Once again, this is a system that its rivals simply can't replicate. Barnes & Noble (NYSE:BKS) offers a $25-per-year membership plan that includes $50 of free coupons and exclusive discounts, but it clearly lacks Amazon's growing list of Prime benefits.

Growth in streaming video

Lastly, Amazon's growing Prime user base gives it a captive audience for expanding its streaming video platform to challenge Netflix. Last June, research firm Sandvine ranked Amazon Prime Video as North America's third-largest video streaming service after YouTube and Netflix.

Last October, eMarketer ranked Amazon Prime Video as the fastest-growing streaming platform in the U.S., and YouGov recently claimed that members of the crucial 18-34 demographic were viewing nearly the same number of hours of Amazon Prime Video as Netflix each week.

Those figures -- along with the growth of the Prime ecosystem and its deep pockets for original content -- should trouble Netflix, which still faces tough questions about rising content costs and the rise of carrier-backed streaming platforms.

Is Amazon truly unstoppable?

Amazon's business model is a formidable one, with deep moats on multiple fronts that make it tough for competitors to gain ground. The only way to stop Amazon is to either beat AWS, which holds a commanding lead in the cloud platform market, or replicate Amazon's multilayered Prime strategy. Since I don't think either of those things will happen anytime soon, I believe that Amazon will remain a great long-term buy for years to come.

Leo Sun owns shares of Amazon. The Motley Fool owns shares of and recommends Amazon and Netflix. The Motley Fool has a disclosure policy.