By Aaron Tilley

Companies are increasingly looking to transform their digital operations during the pandemic by placing bets that promise to boost the cloud-computing businesses of Amazon.com Inc., Microsoft Corp. and Google-parent Alphabet Inc. for years to come.

Posting quarterly results Thursday, No. 1 cloud vendor Amazon said its backlog for cloud services in the second quarter was up 65% from a year earlier, accelerating from 58% growth in the previous quarter and 54% in the second quarter last year. The agreements have an average length of three years, the company said.

"We're seeing migration plans accelerate," Amazon Chief Financial Officer Brian Olsavsky told analysts.

Google, playing catch-up with Amazon in the cloud, said computing-services sales cushioned the drop in its advertising business as it reported its first-ever fall in quarterly revenue. Almost all of Google's $14.8 billion backlog at the end of the June quarter was linked to its cloud business -- whose revenue rose to $3 billion from $2.1 billion a year earlier, Alphabet CFO Ruth Porat said on an investor call Thursday.

"We had many large customers come onto cloud," Alphabet Chief Executive Sundar Pichai said on the call. "Companies are deeply thinking long-term and planning for it."

Businesses have been moving to the cloud in recent years to cut spending, shifting from their own legacy hardware and software to subscription-based remote data storage and online services -- enterprise tools including email and videoconferencing. Those have only become more essential during the pandemic.

Large customers are particularly critical for cloud vendors now, because the startups and smaller companies that were early adopters of their services are among the hardest hit by the pandemic.

Posting full-year results last week, Microsoft, which is No. 2 in the cloud, said commercial cloud bookings grew faster than expected. The chief driver was large, long-term contracts, Chief Financial Officer Amy Hood said.

The cloud hasn't been impervious to the historic economic downturn. Amazon and Microsoft both reported slower cloud-sales growth than the previous year -- in part reflecting the scale their businesses have achieved, but also new frugality among customers hit hard during the pandemic.

"What we see is companies are working really hard right now to cut expenses, especially in the more-challenged businesses like hospitality and travel, but pretty much across the board," Amazon's Mr. Olsavsky said.

Amazon's cloud business, AWS, reached $10.81 billion in sales in the second quarter, up 29% from a year earlier -- short of 30% for the first time since the company began breaking out the figures in 2015. Sales at Microsoft's flagship Azure cloud business advanced 47% in the latest quarter, slowing from 59% the quarter before and 64% a year earlier.

Amazon said it is working with its customers to save on cloud costs. "We think that's the right thing to do not only for their success, and so they can come out of this in better shape, but also for the long-term health of our relationship with them as an AWS provider," Mr. Olsavsky said.

For more WSJ Technology analysis, reviews, advice and headlines,

sign up for our weekly newsletter.

Write to Aaron Tilley at aaron.tilley@wsj.com