Many cloud computing stocks rallied over the past year even as the broader market was weighed down by the trade war, the COVID-19 crisis, and other macro headwinds. Let's examine three leading cloud companies to see how they weathered the recent challenges -- and why their stocks remain compelling long-term investments.

1. Amazon

Amazon (AMZN -2.56%) Web Services (AWS) is the world's largest cloud infrastructure platform. It accounted for 31% of the market in the second quarter of 2020, according to Canalys, while its largest rival, Microsoft's (MSFT -1.27%) Azure, controlled 20%.

An illustration of a futuristic cloud computing chip.

Image source: Getty Images.

Demand for cloud infrastructure services, which lend out computing power, storage, and software development tools to companies, is rising as people access more cloud-based services, apps, and streaming services.

AWS' net sales rose 31% year-over-year to $21 billion, or 13% of Amazon's top line, in the first half of 2020. The segment's operating income grew 48% to $6.4 billion, or 65% of Amazon's total operating profit.

AWS' stable profits subsidize the growth of Amazon's lower-margin e-commerce and digital businesses. That's why Amazon can consistently sell its products at low prices while expanding its 150-million member Prime ecosystem with cheap hardware devices, original streaming content, and other loss-leading perks.

Amazon's total revenue rose 26% year-over-year to $164.4 billion in the first half of the year as the pandemic boosted both its e-commerce and cloud sales. Its EPS jumped 24% as its robust revenue growth offset its higher COVID-19 expenses.

Wall Street expects Amazon's revenue and earnings to rise 32% and 38%, respectively, for the full year. For fiscal 2021, its revenue and earnings are expected to grow 18% and 40%, respectively. The stock isn't cheap at nearly 60 times forward earnings, but Amazon's dominance of the cloud and e-commerce markets easily justifies that slight premium.

2. Salesforce

Salesforce (CRM -0.57%) owns the world's largest cloud-based CRM (customer relationship management) software platform. It controlled 18.4% of the market last year, according to IDC, while its top rival, SAP (SAP -1.61%), held a 5.3% share.

Salesforce also provides other cloud-based e-commerce, marketing, and analytics services. Demand for all these services is rising as companies streamline their operations, automate tasks, and reduce their dependence on human workers.

Salesforce's revenue rose 30% year-over-year to $10 billion in the first half of fiscal 2021, and its adjusted earnings surged 35%. It also remained firmly profitable on a GAAP basis -- which isn't always the case with high-growth cloud companies.

For the full year, Salesforce expects its revenue to rise 21%-22%, and for its adjusted EPS to grow 24%-25%. That confident forecast indicates Salesforce's business is well-insulated from the COVID-19 crisis, and could actually benefit from an accelerated transition toward cloud-based CRM, marketing, and e-commerce solutions.

Next year, analysts expect Salesforce's revenue to rise 18% and for its earnings to stay roughly flat after it laps its acquisition of Tableau. Salesforce's stock might initially seem pricey at over 70 times forward earnings, but it's actually cheaper than many other high-growth cloud stocks.

3. Adobe

Over the past seven years, Adobe (ADBE -1.73%) transformed its desktop-based creativity and productivity software into subscription-based cloud services. That shift initially weighed down its earnings, but locked in more customers and stabilized its long-term growth with recurring revenue. It then expanded that ecosystem with analytics, advertising, and e-commerce services.

A man edits a photo on a PC.

Image source: Getty Images.

Adobe's revenue rose 15% year-over-year to $9.4 billion in the first nine months of 2020 as the stable growth of its Digital Media (Creative and Document software services) unit offset the pandemic-induced slowdown in its Digital Experience (analytics, marketing, and e-commerce services) unit.

Adobe is also profitable by GAAP and non-GAAP measures, and its adjusted EPS grew 30% year-over-year in the first nine months of 2020. It expects its revenue and adjusted EPS to rise about 15% and 26%, respectively, for the full year. Wall Street sees its revenue rising another 15% next year, with 12% earnings growth.

Like Amazon and Salesforce, Adobe's stock doesn't seem cheap at 45 times forward earnings. However, its stable growth throughout the pandemic and the stability of its core Digital Media business should justify its higher valuation. Moreover, Adobe's ongoing share buybacks -- which canceled out 6.5 million shares in the first nine months of the year -- indicate the company doesn't consider its stock to be overvalued.