Amazon’s stock just skyrocketed 18 percent in after-hours trading. Here are three reasons why investors are happy right now:

1) Amazon surprised Wall Street

Amazon surpassed analyst expectations by a landslide. The company was expected to generate losses per share of $0.14 — it instead delivered earnings of $0.19 per share. That’s huge. It also beat revenue estimates by 3 percent.

amazon stock   Google Search

2) Totally unexpected profit

Though Amazon has grown revenues every year since its launch, it hasn’t always posted a profit. Last year Amazon experienced losses for two quarters straight before posting a profit of $214 million in Q4 (holiday sales predictably bolster revenues for the fourth quarter). But the company took a loss of $241 million for the year. Then in Q1 of 2015 it reported another loss of $57 million.

Amazon’s earnings are often a roller coaster, but the company rarely exceeds analysts’ expectations.

3) AWS is growing like mad

Amazon Web Services, which only started reporting actual growth numbers last quarter, showed an 81 percent increase year-over-year — a very favorable growth rate. Amazon also revealed that its cloud business has brought in $5.97 billion for the year ending in June.

Although Amazon’s cloud business is only a small slice of its overall revenue, its growth indicates to investors that Amazon is capable of diversifying revenue sources to great effect. CEO Jeff Bezos is known for investing lots into potential money-generating projects, but few have yet to succeed (like the Fire phone).

Amazon Web Services revenue, updated for 2Q15.

Above: Amazon Web Services revenue, updated for 2Q15

Image Credit: Jordan Novet/VentureBeat

Read more: Why AWS is so crucial to the future of Amazon

VentureBeat's mission is to be a digital town square for technical decision-makers to gain knowledge about transformative enterprise technology and transact. Learn more about membership.