What happened

Shares of Amazon (AMZN 1.30%) soared on Friday, adding as much as 12.6%. As of 11:52 a.m. ET, the stock was still up 10.9%.

The catalyst that sent the e-commerce platform surging was its second-quarter financial report, and while the results were mixed, things were far better than many market watchers had predicted.

So what

Amazon generated net sales of $121.2 billion, up 7% year over year, but even that doesn't tell the whole story. Absent the headwinds created by a strong dollar, revenue would have grown 10%. This resulted in a loss of $2 billion and a loss per share of $0.20, compared to earnings per share (EPS) of $0.76 in the prior-year quarter -- but this also requires context. The bottom-line results included a loss of $3.9 billion resulting from the declining value of its equity stake in Rivian (RIVN 2.84%) -- a number that will change each quarter along with the electric vehicle (EV) maker's stock price. Excluding that noncash loss, Amazon would have been profitable.

To give those numbers further context, analysts' consensus estimates called for revenue of $119 billion and EPS of $0.12. 

The results were mixed across Amazon's operating segments. The company's e-commerce business eked out growth, up 3% year over year. It was Amazon Web Services (AWS) that carried the day, however, as revenue from its cloud computing business jumped 33%. Amazon's digital advertising business continued to grow, up 18%. 

Now what

If investors were psyched about Amazon's current results, they were absolutely delirious about the company's outlook. For the third quarter, Amazon is guiding for net sales in a range of $125 billion to $130 billion, which would represent year-over-year growth of between 13% and 17%, easily outpacing its current results. The company is also guiding for operating income that ranges from flat to $3.5 billion. 

E-commerce has gotten a bad rap lately, due to slowing growth and tough comps. That said, Amazon proved the resilience of its business resulting from its optionality and the continuing strength of its cloud business. Furthermore, management's commentary about the success of Amazon's recent Prime Day signaled to investors that the death of e-commerce has been greatly exaggerated.