The cloud is an integral part of the digital economy. It's the mechanism by which companies are able to shift their operations online, unlocking unprecedented scale and providing new ways to work seamlessly across borders.

By some estimates, the cloud industry as a whole could be worth $483 billion this year, growing at 15.7% annually. That means by 2030, companies that offer cloud services will be fighting for a slice of a $1.5 trillion market opportunity. 

Amazon (AMZN -1.64%) and DigitalOcean (DOCN 0.95%) are uniquely positioned to capture an outsized share of that growing pie. They're tackling the cloud business from completely different angles, and together, they can offer your portfolio diverse exposure to the industry.

Two people standing in a data center with a laptop, analyzing a digital screen.

Image source: Getty Images.

The case for Amazon

Amazon is best known as the world's largest e-commerce company, but it has expanded far beyond that one-dimensional business model. In 2006, the company began offering online storage solutions, which marked the birth of its market-leading cloud computing platform Amazon Web Services (AWS). 

Now, whether you're building a database, delivering high-quality video content, or even developing machine learning models, AWS provides the most comprehensive suite of cloud-based tools in the industry. Its portfolio of services truly is diverse, giving the majority of industries access to the benefits of migrating to the digital realm.

AWS is also Amazon's profitability engine. Despite accounting for just 13% of Amazon's $470 billion in total revenue during 2021, AWS was the source of 74% of its total operating profit. That's because cloud computing is highly scalable with a high gross margin, whereas the e-commerce business is complex and clunky with high fixed costs. 

While Amazon is certainly an investment-worthy company for its cloud and e-commerce industry dominance alone, there's even more to this story. In the fourth quarter of 2021, the company began to report its booming advertising business as a stand-alone segment. It generated $31 billion in revenue for the year, and for context, that's more than Alphabet's YouTube video platform delivered. 

But Amazon is also dabbling in innovative new areas like electric vehicles, accumulating a stake in Rivian Automotive over the last few years. Put simply, buying Amazon stock for its cloud business is perfectly acceptable, but with all of these additional segments attached, it's a surefire winner in the modern economy.

People viewing a mobile device in front of stacks of supercomputers.

Image source: Getty Images.

The case for DigitalOcean

Amazon is a $1.6 trillion company, while DigitalOcean trades at a valuation of just over $6 billion, so it might seem crazy to mention them alongside one another. But DigitalOcean has built its cloud services brand with an intense focus on small to mid-sized businesses, competing with giants like Amazon on affordability, service, and ease of use.

Scale tends to play a major role in the price of cloud services. Larger organizations using more tools and more bandwidth usually get a discounted rate that continues to get cheaper as they grow. DigitalOcean works in a similar way, but its starting prices are a huge differentiator. 

Its bandwidth prices begin at $0.01 per gigabyte, per month, which is 80% cheaper than its closest competitor. And whether you're deploying virtual machines, managing databases, or require storage, DigitalOcean's starting packages range from just $0 to $15 per month. Its platform also supports a range of one-click tools to make deployment simple and easy, making it perfect for start-ups or those with limited technical expertise. 

While the cloud industry as a whole is expected to grow 15.7% per year, DigitalOcean estimates the smaller segment it serves (individuals and companies with less than 500 employees) could grow 26% annually to reach $145 billion by 2025. That means the company could snatch increased market share over time just by focusing on one corner of the industry: the small to mid-sized customers it's having so much success with already.

The company now serves over 609,000 businesses with 99,000 of them spending $50 or more per month. That resulted in $429 million in revenue during 2021, up 35% from the prior year. But given the size of the opportunity ahead of it, DigitalOcean stock has a long runway for growth.