Amazon's third quarter results far exceeded Wall Street expectations Thursday, pushing up its stock by over 7 percent in after hours trading.

Investors were expecting smaller profits as the third quarter is typically a heavy investment period for Amazon ahead of the holiday season. But strong growth in North American sales and Amazon Web Services offset increased spending in new areas.

The company also offered a positive outlook for the fourth quarter, its largest quarter of the year.

Revenue increased 34 percent from last year, in part due to the $1.3 billion in sales from Whole Foods, which Amazon acquired in late-August. North American sales were $25.4 billion, up 35 percent from last year, while international sales grew 29% to $13.7 billion.

AWS remains the the company's growth driver, jumping another 42 percent in sales. Amazon's cloud business is the company's most profitable unit that allows it to keep investing in the core business.

Investors continue to give a pass on Amazon's laser-thin profits. Operating profit dropped in all three major segments, by 40 percent in total to $347 million, as operating expenses grew 45 percent from a year ago. That resulted in an operating margin of just 0.8%, the lowest since September 2014.

Still, Amazon shares were up by as much as 8 percent in extended hours, and have grown 30 percent year-to-date.

Amazon also broke out physical store sales for the first time, posting $1.3 billion in revenue, which primarily came from Whole Foods.

Amazon said it added 160,000 employees in the last three months (roughly 87,000 from Whole Foods), ahead of the all-important holiday seasons.

Amazon gave fourth quarter guidance in the range of $56.0 billion and $60.5 billion, right in-line with street estimates of $58.9 billion.