Amazon CEO Andy Jassy speaks at the Bloomberg Technology Summit in San Francisco on June 8, 2022.

David Paul Morris | Bloomberg | Getty Images

Amazon shares jumped 6% on Friday after the company reported better-than-expected earnings, driven by growth in its cloud computing and advertising businesses.

The stock is up about 32% for the year. Shares briefly touched $200.50 on Friday, putting them near an all-time high. Its highest close was $200, a mark the stock hit twice in July. The stock closed at $197.93 on Friday.

Revenue increased 11% in the quarter to $158.9 billion, topping the $157.2 billion estimate of analysts surveyed by LSEG. Earnings of $1.43 topped the average analyst estimate of $1.14.

Sales in the Amazon Web Services cloud business increased 19% to $27.4 billion, coming in just shy of analysts’ estimates, according to StreetAccount. That was an acceleration from 12% a year ago, but trailed the rate of growth at rivals Microsoft and Google, where cloud revenue increased 33% and 35%, respectively. Microsoft’s Azure number includes other cloud services.

Amazon’s capital expenditures surged 81% year over year to $22.62 billion, as the company continues to invest in data centers and equipment such as Nvidia processors to power artificial intelligence products. Amazon has launched several AI products in its cloud and e-commerce businesses, and it is also expected to announce a new version of its Alexa voice assistant powered by generative AI.

“Amazon has integrated AI into what is the most diverse tech footprint of any mega cap, with multi-billion revenue streams in e-commerce, advertising, subscriptions, online video, and cloud,” analysts at Roth MKM wrote in a note after the earnings report. They have a buy rating on the stock.

Brian Olsavsky, Amazon’s chief financial officer, said on the earnings call that the majority of the company’s 2024 capex spending is to support the growing need for technology infrastructure.

CEO Andy Jassy said the company plans to spend about $75 billion on capex in 2024 and that he suspects the company will spend more next year.

“The increased bumps here are really driven by generative AI,” Jassy said on the call. “It is a really unusually large, maybe once-in-a-lifetime type of opportunity,” he said, noting that shareholders “will feel good about this long term that we’re aggressively pursuing it.”

Advertising was another bright spot. Sales in the unit expanded 19% to $14.3 billion during the quarter, meeting expectations and outpacing growth in Amazon’s core retail business.

Amazon’s ad growth was about in line with Meta, which saw 18.7% expansion, and faster than growth at Google, which reported a 15% increase in ad revenue. Snap‘s sales also jumped 15% from a year earlier.

Amazon forecast revenue in the current quarter to be between $181.5 billion and $188.5 billion, which would represent growth of 7% to 11% year over year. The midpoint of that range, $185 billion, fell short of the average analyst estimate of $186.2 billion, according to LSEG.

— CNBC’s Ari Levy contributed to this report.

Don’t miss these insights from CNBC PRO