Oct 27 (Reuters) - Amazon.com rallied nearly 6% on Friday on signs that growth in its main profit driver, the cloud business, was picking up pace after two years of sluggishness due to lower client spending.

The company was on track to add more than $70 billion to its market capitalization based on its premarket share price of $127. Smaller cloud rivals Microsoft and Alphabet also gained around 1% each.

Amazon CEO Andy Jassy said on Thursday the cloud business was stabilizing as large expansions with existing customers and first-time agreements were likely to aid growth in the final three months of the year.

He also touted the AI opportunity for Amazon Web Services (AWS), saying that he expected the technology to lead to "tens of billions of dollars in revenue over the next several years".

Wall Street cheered the positive commentary for the business that brings in almost all of Amazon's profit, but had slowed after the pandemic as customers cut costs.

"Tech investors can breathe a sigh of relief, Bernstein analysts said in a client note, adding that "AWS growth sounds ready to re-accelerate even without AI."

About 19 brokerages raised their price targets on the stock, pushing their median view to $173, according to LSEG data.

Amazon shares have rallied 40% this year, but they have lost nearly 8% in the past two days after Alphabet warned that cloud customers were curbing spending.

In the July-September period, Amazon posted its first quarter-on-quarter increase in cloud growth in nearly two years, although the unit's revenue fell short of estimates.

The 12.3% growth in AWS was also slower than the 29% rise seen at Microsoft's Azure cloud business, which had topped market estimates. Google Cloud grew 22.5% in the period.

Amazon trades at 38.49 times its 12-month forward earnings estimates, compared with Microsoft's 27.85 and Alphabet's 18.66.

To be sure, Amazon's cloud business is larger than that of Microsoft and Google. But the e-commerce firm is seen as a laggard in the AI race that Microsoft is leading with its bet on OpenAI and focus on big clients that already use its services.

Amazon has tried to catch up by signing a deal in September to invest up to $4 billion in chatbot-maker Anthropic and rolling out its Bedrock AI service that has drawn thousands of customers.

"Generative AI is a massive catalyst that could re-ignite growth within the (AWS) franchise," said Global X analyst Tejas Dessai.

"We see some major partnerships secured in this quarter, as key towards driving that growth in the coming quarters."

(Reporting by Aditya Soni in Bengaluru; Editing by Arun Koyyur)