(Reuters) – E-commerce giant Amazon reported a surprise profit for the second quarter in a row, propelled by higher sales in North America, its biggest market, and another period of strong growth in its Amazon Web Services cloud business.
Sales in North America rose 28.3% to $15.01 billion in the third quarter ended Sept. 30, helped by robust Prime Day sales and strong demand for electronics and general merchandise throughout the period.
Amazon, whose shares were up 10% in after-hours trading on Thursday, said in July that customers ordered 34.4 million items worldwide during the one-day sale for members of its $99 per year Prime subscription service.
Amazon has consistently chalked up strong revenue growth but has sunk most of it back into investments to expand its distribution network, add original media content to Prime, and develop devices such as the unpopular Firesmartphone.
Net sales from Amazon Web Services, which has more than 1 million active customers in 190 countries, rose more than 78% to $2.09 billion in the quarter.
Amazon forecast net sales growth of 14% to 25%, to a range of $33.50 billion and $36.75 billion, for the holiday shopping quarter.
Analysts on average were expecting revenue of $35.16 billion, according to Thomson Reuters I/B/E/S.
The world’s biggest online retailer reported a profit of $79 million, or 17 cents per share, compared with a loss of $437 million, or 95 cents per share, a year earlier.
Total net sales rose 23.2% to $25.36 billion. Analysts on average had expected a loss of 13 cents per share on revenue of $24.91 billion, according to Thomson Reuters I/B/E/S.
Amazon’s shares (AMZN) closed at $563.91 on Thursday.
For more about Amazon, watch this Fortune video: