Amazon shares rocketed higher Thursday after the online giant surprised the market by swinging to profit in the second quarter amid surging sales.
The US e-commerce giant, which is also a major player in online video and cloud computing, reported a net profit of $92 million while revenues jumped 20 percent from a year ago to $23.18 billion.
Amazon shares vaulted 17 percent in after-hours trade to $568. Analysts had been expecting a net loss for the Seattle-based firm.
The company founded by Jeff Bezos has been known for investing in long-term projects with little concern for short-term profits, but some of those investments appear to be paying off.
"The teams at Amazon have been working hard for customers,” said Bezos, who cited the company's diverse offerings including Emmy-nominated television shows, a voice-controlled personal assistant and a range of cloud computing services.
Amazon Web Services, the cloud computing division, was a big factor in the results, showing a revenue jump of more than 80 percent to $1.8 billion in the three months to June 30, and accounting for $391 million in operating income.
North American sales, which are the largest segment for Amazon, rose 25 percent to $13.8 billion.
Amazon also offered a better-than-expected outlook for the current quarter, predicting revenues in the range of $23.3 billion to $25.5 billion.