Shopify shocked Wall Street recently when it announced that it was selling most of its logistics business, roughly a year after acquiring Deliverr for $2.1 billion in an attempt to build a logistics business.

Investors cheered the decision, but perhaps nobody is happier about the news than arch-rival Amazon (AMZN 0.75%). Shopify's abrupt exit likely cements Amazon's place as the dominant e-commerce platform in the market.

With shares more than 43% down from their high, now might be a great time to revisit this e-commerce powerhouse. Here is why Amazon's stock is a buy today.

Amazon's moat is real

Amazon has spent billions of dollars in recent years, building a network of distribution centers and delivery networks to fulfill its orders quickly and efficiently. Shopify's platform business model enables merchants of any size, from individuals to enterprises, to easily build and operate online stores. The company was attempting to get into logistics to take that next leap. However, Shopify has realized it wasn't up for the financial task.

AMZN Capital Expenditures (TTM) Chart.

AMZN Capital Expenditures (TTM) data by YCharts.

Amazon's nearly $63 billion in investments over the past year is almost what Shopify's entire company is worth. It's a feat that virtually nobody else has the deep pockets for. It used to take days to receive a package, but Amazon is gradually working toward faster deliveries -- some markets offer same-day delivery.

The company's breadth of size and efficiency is a real competitive advantage because it will be hard for another to come in and match the investment needed to build such a logistics machine. This efficiency means Amazon can offer better service at lower prices, growing its e-commerce business in America, where 85% of retail is still offline.

Future growth opportunities through Prime memberships

It seems Amazon's cloud business, AWS, has become the focal point of the stock's investment thesis, and it has even been criticized lately for slowing growth in that segment. But I'd argue that Prime is still as important to shareholders as ever. Today, Amazon's Prime subscriptions generate nearly $40 billion in high-margin revenue each year, and that's growing.

Today, there are more than 200 million members worldwide, though most of them reside in the United States, where Amazon's business is concentrated. Investors should think of this massive user base as a distribution network where Amazon can devise ways to monetize Prime users and quickly scale it.

This distribution helps explain why Amazon has invested so much in protecting its retail business and is paying $11 billion for the rights to broadcast National Football League games to its Prime audience. Amazon founder Jeff Bezos once said that he wanted Prime to be "such a good value, you'd be irresponsible not to be a member." The company still operates with that mindset, which could generate big returns for shareholders over time.

Amazon stock is on sale

Amazon's huge investments in its business have skewed profits and made the stock harder to get a read on. But if you strip away those investments and focus on the cash profits from its day-to-day operations, you'll see the stock is nearly its cheapest in a decade.

AMZN Price to CFO Per Share (TTM) Chart.

AMZN Price to CFO Per Share (TTM) data by YCharts.

Assuming Amazon's massive investments into the business tail off at some point, that should reinvigorate Amazon's bottom line and make the stock suddenly look much more appealing. But if you're trying to get in before the rush, now is a great time to consider buying shares for the long term. Now that Shopify has waved the white flag in going toe-to-toe in fulfillment, Amazon's poised to dominate.