Amazon NASDAQ:AMZN shares jumped 12% early Friday after the company reported second-quarter results that exceeded expectations across revenue, cloud growth and operating profit.

Amazon generated $200.6 billion in quarterly revenue, up 20% from a year earlier. Amazon Web Services was a key contributor, with sales rising 37% to $42.2 billion. The cloud unit posted its fastest growth rate in 18 quarters and came in ahead of market forecasts.

Amazon also reported operating income of $27.5 billion, surpassing both its prior outlook and analyst expectations. Amazon's results reflected continued strength in cloud services, advertising and its expanding artificial intelligence operations.

Amazon provided third-quarter revenue and operating income guidance that was somewhat below consensus expectations. However, Amazon's stronger-than-expected second-quarter performance and continued momentum at AWS appeared to outweigh concerns about the softer outlook.

Amazon shares finished the session more than 12% higher as investors focused on accelerating cloud growth and improving profitability.