There's no debating that Amazon is one of the greatest investments of all time. Growing out of Jeff Bezos' garage into the trillion-dollar empire it is today is nothing short of impressive. And it will most likely be relevant and growing for many years to come. However, with its $550 billion in trailing-12-month revenue and a market capitalization of $1.5 trillion, I think it's fair to expect some moderation in the long-term potential of Amazon stock.

And for this reason, I'd like to highlight two companies that could deliver superior returns from here: Pinterest (PINS 4.04%) and Shift4 Payments (FOUR 0.22%). In fact, both have important integrations with Amazon that could help fuel long-term returns, as I'll explain.

1. Pinterest

Over the last four quarters, Amazon has generated nearly $44 billion in advertising services, meaning this is quickly becoming the company's next great business. And revenue for this segment was up a strong 26% year over year in the most recent quarter.

In short, Amazon's ad business is big and fast-growing. And now, Pinterest -- which generates revenue via ads -- is tapping into Amazon's ad business for growth of its own.

With its image-browsing platform, Pinterest is trying to combine visual inspiration with e-commerce. It knows that its 482 million global monthly active users are already looking for ideas for decorating their homes, designing crafts, and more. Therefore, it simply wants to provide them with the option of purchasing relevant products since they're in the mood for shopping anyway.

In April, Amazon and Pinterest struck a deal to bring Amazon's ads onto Pinterest. Those who pay Amazon to promote listings will now get advertising space on Pinterest automatically, when appropriate.

I'm not simply highlighting seven-month-old news here. It's consequential to investors right now. Pinterest CEO Bill Ready says that "the most meaningful revenue" won't start rolling in until early 2024. So the partnership has been announced, but the benefits to Pinterest have yet to materialize.

The Amazon partnership is a win-win-win for Pinterest and its users. The site's users win because Pinterest says the Amazon partnership is leading to a 50% improvement in ad relevance. Amazon wins because it improves outcomes for its customers. And Pinterest wins because it gets revenue growth with lower spending on sales and marketing.

Add one more win to the column: Shareholders should win as third-party ads lead to improved financial results for Pinterest.

2. Shift4 Payments

In 2018, Amazon first opened a cashier-less convenience store called Amazon Go. Some might consider the idea a flop. The company has only a handful of stores and it recently announced that it was closing some underperformers. But fintech company Shift4 has recently partnered with Amazon to put the latter's cashier-less tech to good use.

Shift4 stands out from many of its fintech peers because it provides financial services to incredibly large venues, such as professional sports teams' stadiums and large resorts. With sports, the action during the game rarely stops and fans rush the same stores during the few brief breaks.

Amazon's Just Walk Out tech is now being used by Shift4 to alleviate these bottlenecks. Sports fans can grab what they want and walk out without waiting in prohibitively long lines. It's the kind of upgrade that can help Shift4 win more business inside stadiums and land new large-venue customers that want the specialized financial services that the company can provide.

Shift4's focus wasn't always on high-volume customers, but management has leaned into this more and more in recent years. And it's been a great choice. The company's payment volume has increased dramatically, leading to outstanding revenue growth. Moreover, growth has been profitable, with its earnings per share (EPS) skyrocketing in the past year.

FOUR Revenue (TTM) Chart

FOUR revenue (TTM) data by YCharts; TTM = trailing 12 months.

Shift4's partnership with Amazon doesn't change the game. It merely illustrates the company's commitment to winning and keeping large customers. And as long as it's executing on that strategy like it is now, I believe the business has a chance at market-beating upside.

In summary, Amazon is a great business and returns have been stellar. But shares of Pinterest and Shift4 likely have more upside today due to their much smaller size. Moreover, both of these growth stocks are tapping into some key strengths from Amazon, which could help propel them forward.