The tech giant reported a net income of $92 million, or 19 cents per share (statement).
Non-GAAP earnings were 19 cents per share with revenue of $23.18 billion, up 20 percent year-over-year.
Wall Street was bracing for a loss of 14 cents per share and $22.39 billion in revenue.
Shareholders were apparently surprised and pleased by the better-than-expected sales results as both stock and Twitter praise soared in after hours trading.
Q2 2015 marks the second quarter in which the Seattle-headquartered corporation is breaking out specific results for its hugely successful cloud unit, Amazon Web Services.
AWS delivered $1.824 billion in revenue, an uptick from $1.005 billion the same time last year.
CEO and founder Jeff Bezos highlighted AWS, among a plethora of other products in the vast Amazon portfolio, in prepared remarks by noting AWS has already added 350 features to date this year, making it "ahead of last year's pace."
For the current quarter, Wall Street is projecting that loss to steeply increase to 61 cents per share matched by $23.89 billion in revenue.
Amazon responded with a Q3 revenue guidance range of $23.3 billion and $25.5 billion.
Chart via Amazon Investor Relations