There's no nice way to dress it up. This has been a rotten year for tech investors.

The tech-laden Nasdaq Composite index has tumbled by 29% since hitting an all-time high last November. Even those of us who have been investing long enough to remember the dot-com crash at the turn of the century keep rubbing our eyes in disbelief.

This time around, shares of already profitable companies in the exploding cloud services industry have been hit hard even though they're in a high-growth industry. Tech research specialist Gartner estimated worldwide spending for cloud services at $411 billion last year, and expects this figure to reach $600 billion in 2023.

Last year, when they were trading at lofty valuations, these cloud stocks looked like smart buys because their businesses were growing at blazing fast rates. They're still growing, and now that their stock prices have fallen 40% or more from their previous peaks, they look like screaming buys.

Amazon

Most Americans think of Amazon (AMZN -1.14%) as an e-commerce company, but that isn't how it makes most of its money these days. In the first quarter of 2022, service revenue actually exceeded product sales. Cloud service profit margins are generally much wider than margins in the e-commerce space.

In 2020 and 2021, Amazon invested heavily to effectively double the size of its fulfillment network. Now that most of us can shop in person again, that larger network of warehouses led to a net loss of $3.8 billion in the first quarter that would have been much worse if Amazon Web Services hadn't contributed a $6.5 billion operating profit.

Amazon's e-commerce business has dealt with minor losses due to rapid expansion in the past, and I believe it's just a matter of time before it's highly profitable again. At recent prices, the stock trades at just 2.4 times revenue, down from more than four times revenue at its peak last year. With more high-margin revenue from its cloud services business, profits could soar in 2023 and carry the stock up to new heights.

DigitalOcean

While Amazon remains the go-to cloud service provider for established businesses, said services aren't always accessible to individual developers, data scientists, or hobbyists. DigitalOcean (DOCN -0.90%) allows anyone with a credit card to start building their own applications for $0 per month. 

By allowing access to powerful tools for next to nothing, DigitalOcean is cultivating a large following of developers. The company's clients may start out small, but many have grown along with the amount of revenue they contribute. First-quarter sales rose 36% year over year to $127 million. With around 84% of customers spending less than $50 per month, it's clear that most smaller developers stay small. 

DigitalOcean is a great stock to buy now and hold for the long run, because the individual customers who go on to run serious businesses centered around their applications are highly unlikely to switch vendors. We can see this playing out in recent results. In the first quarter, the company reported a net dollar retention rate of 118% for customers who spend more than $50 per month.

In the first quarter, average revenue per user soared 28% year over year to $68.90 annually. This might not seem like a lot, but it's already enough to drive strong profit margins. In 2022, the company expects free cash flow to come in at around 9% of revenue.

With an army of individual developers building applications, this company's cash flows could explode in the years ahead. At the moment you can buy shares of DigitalOcean for just nine times trailing sales. That's a very attractive price for a company with an obviously profitable business model that is growing revenues by around 35% annually.