Analysts had been expecting a net loss for the Seattle-based firm.
North American sales, which are the largest segment for Amazon, rose 25% to $13.8 billion.
Amazon got a boost in revenue from Amazon Web Services, a suite of products and services offered to businesses by way of the “cloud”, or remote servers that enable users to access applications on any machine with an Internet connection.
Its cloud computing division, Amazon Web Services, also made a contribution, with sales up 81% compared to the same quarter previous year.
Shares in Amazon jumped as much as 19 percent after it reported Thursday that revenue rose 20 percent to $23.2 billion, helped by a fast-growing cloud-computing business and initiatives to attract more customers.
“We’re thrilled with the results of Prime Day”, Amazon CFO Brian Olsavsky said. The promotion, designed to drive Prime membership signups, featured reduced prices on television sets, lawnmowers and other goods and helped to drive orders surpassing Black Friday, an annual U.S. sales event that kicks off the year-end holiday shopping season.
“We think EGM (especially in the U.S.) is the best proxy for overall commerce growth for Amazon as it is generally a catch-all category for everything outside Media, and growth here accelerated sequentially second quarter in a row”, Jefferies’ research team wrote shortly after earnings were released. Analysts on average had expected a loss of 14 cent per share and revenue of $22.39 billion.
For the second quarter, Amazon reported a profit of United States dollars 92 million, or 19 cents per share, compared with a loss of United States dollars 126 million, or 27 cents per share, a year earlier. Wall Street views AWS as an important source of stable profits. The advance pushed Amazons market value to about $264 billion, more than that Wal-Mart Stores Inc., the worlds largest retailer.
The company forecast net sales to grow 13-24 percent to $23.3 billion-$25.5 billion in the third quarter, well above the average analyst of $23.89 billion, reported by Thomson Reuters I/B/E/S.
The shares climbed 17 percent to $564.11 at 9:33 a.m.in New York and posted the biggest intraday gain in nearly six years.
Before the results, Amazon shares already were up more than 50 percent this year. AWS operating income jumped from $77 million in Q2 2014 to $391 million in Q2 2015.