On Thursday, Amazon (AMZN) released a second quarter report which vastly outperformed analyst profit forecasts, after a year of wide scale layoffs cut costs dramatically. Profits soared despite Amazon web services slowing, as Microsoft and Alphabet have stolen market share from the service.

Amazon stock gained roughly 7% in after-hours trading off the news.

Still the company reported its cloud business has a small beat on revenue, with sales for Amazon Web Services (AWS) coming in at $22.14 billion compared to Wall Street expectations of $21.71 billion.

The third quarter outlook on revenue also pleased investors, at $138 billion to $143 billion, compared to estimates of $138.3 billion having been expected.

Tech investors were most focused on the cloud results because the sector is continuing to struggle through a slowdown which has left its future uncertain. While investors are pleased with the profit line for the time being, it is unclear if that will remain sustained.

Net sales came in at $134.38 billion versus a $131.63 billion estimated, with guidance coming in at $127 billion to $133 billion. Diluted EPS was $0.65 versus $0.35 estimated. Amazon Web Services (AWS) Net Sales saw $22.14 billion compared to $21.71 billion estimated. Operating Margin was 5.7% versus and estimate of 3.46%. Operating Income came in at $7.68 billion versus an estimate of $4.72 billion. Q3 Net Sales Outlook was $138 billion-$143 billion compared to $138.3 billion estimated.

The results on cloud services were significant as the sector has been a battleground between tech giants, with Alphabet (GOOG, GOOGL) and Microsoft (MSFT), reporting mixed cloud results.

Amazon’s beat on operating income comes after the company has cut 27,000 jobs as part of a major cost-cutting initiative by CEO Andy Jassy. Investors were also enthused about the outlook beat for the third quarter as it will include the revenues from Prime Day, which was held in July.

Amazon said that the first day of its July event had produced the largest ever single day of sales for the company, as customers spent more than $2.5 billion of more that 375 million products, according to data provided by the company.

Brent Thill, of Jefferies said of the results, “Delivering strong results across the board. 2Q Net Sales came in 2% above cons while Op Income was 60% ahead, driven by Net Sales and Op Income beats across North America, International and AWS. The mid-point of 3Q guidance for Net Sales was 1.5% above consensus, while Op Income was 26% above at the midpoint. The mid-point of 3Q Operating Income guidance implies a moderation in Operating Margin (to 5.0% vs. 5.7% in 2Q), although AMZN generally takes a pragmatic approach to its profit outlook.” 

Verified by MonsterInsights