The power of the ole’ mighty earnings beat at the hands of a bunch of layoffs.

Amazon (AMZN) blew away analyst profit forecasts for the second quarter on Thursday amid a year’s long effort to slash cuts by wide scale layoffs. The profit upside came despite a continued slowdown in sales of Amazon Web Services as the company lost market share to Microsoft and Google.

Amazon shares popped about 7% in after-hours trading.

The e-commerce giant reported a relatively small — but vital — beat for revenue in its cloud business, Amazon Web Services, or AWS, with sales coming in at $22.14 billion compared to the $21.71 billion that Wall Street was anticipating.

Additionally, Amazon’s third quarter revenue outlook was a striking beat, coming in between $138 billion and $143 billion, ahead of the $138.3 billion expected.

Currently, cloud results are top of mind for tech investors, as the sector is in the midst of a slowdown with an uncertain future. For now, investors appear to be pleased in the profit line. Whether that is sustained is unclear.

The earnings rundown

  • Net Sales: $134.38 billion actual versus $131.63 billion estimated (guidance: $127 billion to $133 billion)

  • Diluted EPS: $0.65 versus $0.35 estimated

  • Amazon Web Services (AWS) Net Sales: $22.14 billion versus $21.71 billion estimated

  • Operating Margin: 5.7% versus 3.46% estimated

  • Operating Income: $7.68 billion versus $4.72 billion estimated

  • Q3 Net Sales Outlook: $138 billion-$143 billion versus $138.3 billion estimated

Cloud has been a key battleground among tech giants. Alphabet (GOOG, GOOGL) and Microsoft (MSFT), both cloud rivals for Amazon, reported earnings last week, with relatively mixed cloud results.

AWS sales rose 12% year over year excluding volatile foreign currencies. Sales for AWS gained 16% in the first quarter.

For its part, Microsoft Azure clocked a decline in its revenue growth for the second quarter, which has been the case each quarter since at least Q3 of last year. Meanwhile, Google Cloud turned profitable for the first time in Q1 and saw income of $395 million in the second quarter — a stark contrast to the same quarter last year, when Google Cloud reported a $590 million loss.

What else caught our attention: Forward guidance and operating income

Amazon’s operating income beat comes after months of serious cost-cutting efforts led by CEO Andy Jassy. That efficiency push has visibly materialized in the company’s 27,000 layoffs to date.

Additionally, Amazon’s Q3 outlook beat is noteworthy for its link to Prime Day. Amazon held its often-seismic Prime Day event in July and, in Q3, those sales will be reflected in full.

Amazon has already disclosed that the first day of the July event was the largest-ever single day of sales, as consumers spent more than $2.5 billion on north of 375 million products, according to the company.

What analysts are saying post-earnings

“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.” -Brent Thill, Jefferies

Allie Garfinkle is a Senior Tech Reporter at Yahoo Finance. Follow her on Twitter at @agarfinks and on LinkedIn.

For the latest earnings reports and analysis, earnings whispers and expectations, and company earnings news, click here

Read the latest financial and business news from Yahoo Finance

Source: finance.yahoo.com