Amazon (NASDAQ:AMZN) reported its third-quarter results after market close on October 22, beating analyst estimates on all fronts. The third quarter looked a lot like the second quarter, with the company swinging to profitability on the back of improving margins in both the North American retail and AWS segments. Here's a look at the details.

Earnings rundown
Amazon reported revenue of $25.4 billion, up 23% year over year, and up 30% excluding the unfavorable impact from changes in foreign exchange rates. Net income was $79 million, or $0.17 per share, up from a loss of $437 million, or $0.95 per share, during the third quarter of 2014. Amazon's operating income was well above the company's prior guidance, coming in at $406 million, a swing of almost $1 billion year over year.

The North American retail segment grew sales by 28.3% year over year, bringing in just more than $15 billion of revenue. Segment operating income, which excludes stock-based compensation, soared to $528 million, up from a loss of $60 million during the third quarter of 2014. The international segment continued to struggle due to currency headwinds, with revenue growing of just 7.2%, and a segment operating loss of $56 million.

AWS continued to grow at a rapid pace, with revenue of $2.09 billion growing by 78% year over year. AWS grew by 14.3% sequentially in the third quarter, a bit slower than the 16.5% sequential growth Amazon reported in the second quarter. AWS generated $521 million of segment operating income, good for a margin of 25%. This is compared to $98 million of segment operating income, and a margin of just 8.4%, during the third quarter of 2014.

Operating cash flow during the trailing-12-month period rose 72%, to $9.8 billion, with TTM free cash flow reaching $5.4 billion, nearly quintupling year over year. Amazon's free cash flow excludes a significant amount of capital spending done through capital leases, and treating this spending as normal capital expenditures, Amazon's adjusted TTM free cash flow was a far lower $637 million. Amazon spent $4.4 billion on capex, and an additional $4.6 billion through capital leases, during the past 12 months.

Expecting a strong holiday season
The first line of Amazon's press release reads, "Expects record holiday season," and the company's guidance doesn't disappoint. Amazon expects revenue between $33.5 billion and $36.75 billion during the fourth quarter, which represents year-over-year growth between 14% and 25%. Operating income is expected to be between $80 million and $1.28 billion compared to $591 million in the fourth quarter of last year. The high-end of Amazon's guidance represents more than a doubling of operating profit year over year.

The second line of Amazon's press release states, "Majority of units shipped expected to be Prime," which in no uncertain terms demonstrates the importance of Prime to Amazon's business. Amazon doesn't disclose the total number of Prime subscribers, but the company's unearned revenue balance, which includes the portion of Prime subscriptions yet to be recognized as revenue, has risen by nearly 70% since the end of 2014. This suggests that Amazon is having no problem convincing customers to pay for Prime.

Not much has changed since the second quarter. Revenue continued to soar in the North American retail and AWS segments, while the International business is still being dragged down by currency issues. Profitably also continued to improve, although the total net profit of $79 million is negligible for a company with $25 billion of quarterly revenue. And much like in previous years, a big holiday season is on its way.

Timothy Green has no position in any stocks mentioned. The Motley Fool owns shares of and recommends Amazon.com. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.