Cloud computing is a massive industry right now and still growing, with an estimated market size of $1.5 trillion by 2030, according to Grand View Research.

Lots of tech companies have their hands in cloud computing these days, so where should investors even begin? Two great places to start are with The Trade Desk (TTD 4.15%) and Amazon (AMZN 1.30%). Here's why.

A cloud icon on a microchip.

Image source: Getty Images.

The Trade Desk's cloud-based ad opportunity

The simplest way to describe what The Trade Desk does is that it's an online platform for companies to buy ads for internet-connected devices including laptops, cellphones, and connected TVs. The company is tapping into a massive global digital ad market that will be worth $567 billion this year, up nearly 9% from 2021, according to Insider Intelligence. 

The online ad industry is evolving and moving away from pesky online trackers, called cookies, and The Trade Desk is making it easier for companies to adapt. 

That's because the company has created a unique online identifier called Unified ID 2.0, that's already being used by The Washington Post, fuboTV, and Amazon Web Services. The Trade Desk's Unified ID 2.0 helps companies display relevant advertising while keeping people's identities more anonymous. 

The Trade Desk isn't just trying to tap into a new opportunity; it's already massively successful in the ad space.

In the third quarter, the company's sales increased 31% to $395 million, beating management's own guidance as well as analysts' consensus estimate.  Additionally, the ad sales growth came at a time when other major industry players were experiencing a slowdown in their ad revenue. 

The Trade Desk's shares trade for about 16 times the company's sales right now, which is down very significantly from its 46 P/S ratio this time last year. 

Amazon's cloud dominance can't be ignored

Amazon is the obvious choice for top cloud stock, but some investors still overlook the company's cloud dominance and its long-term prospects. The company's Amazon Web Service (AWS) is one of the leading public cloud companies with 34% of the market compared to Microsoft Azure's 21% and Google's 11%. 

AWS is far more than just a side project for Amazon, especially considering that it's one of the company's only profitable businesses. In the third quarter, AWS sales increased by 27% to $20.5 billion and operating income for the segment grew 10% to $5.4 billion. While Amazon's North American e-commerce business generates the most revenue -- $78.8 billion in the third quarter -- it also had an operating loss of $412 million.

In addition to the company's massive cloud business, investors should also consider the company's expanding opportunity in the ad space. The company is now the third-largest digital ad company behind Meta Platforms and Google and in the third quarter, its ad sales spiked 25% to $9.5 billion.

And while some cloud companies could struggle in the ad space as tracking becomes less popular, Amazon's massive e-commerce platform means it has built-in demand from advertisers. With Amazon's stock trading at just 1.9 times the company's sales right now, below the S&P 500's historic average of about 2.4, now could be a good time to pick up some shares.

One thing to note about the tech industry right now

If you haven't already noticed, tech stocks are volatile right now. That means that while Amazon and The Trade Desk could be great long-term investments, in the short term they'll likely experience some volatility. 

But long-term investors who buy and hold the stocks for five years or longer should be rewarded for their patience.