Amazon.com (NASDAQ:AMZN) stock has been on fire lately. Shares of the online retail king are up by over 120% from their lows of the last year, trading at historical highs of around $625 per share. Let's look at the main drivers behind these gains and what they mean for investors in Amazon stock going forward.  

Sales are booming
Amazon reported $25.4 billion in total sales during the third quarter of 2015, a big 23% year-over-year increase. Excluding the $1.3 billion negative impact from currency fluctuations, total sales grew by a staggering 30%. This kind of performance is quite outstanding for a company as big as Amazon, even in the rapidly growing e-commerce industry. 

Source: Amazon.com.

By comparison, eBay (NASDAQ:EBAY) reported $2.1 billion in revenue last quarter, a 2.1% decline versus the third quarter in 2014, while sales in constant currency increased by a modest 5%. eBay is only a fraction of Amazon's size in terms of revenue, and this should theoretically mean higher potential for growth. Far from that, Amazon is still crushing eBay in terms of revenue growth.

Amazon ended the third quarter with 294 million active accounts, while eBay has an active buyer base of 159 million. Amazon is almost twice as big as eBay in terms of users, but it makes nearly 12 times more money in terms of revenue. Amazon is the undisputed king in e-commerce, and the company just keeps broadening the gap versus the competition. 

Sustained growth in North America
North America is Amazon's biggest and most mature division, so you would expect growth to decelerate over time because of market maturation. However, Amazon registered a whopping 28% increase in North America revenue during the third quarter, reaching $15 billion. The electronics and general merchandise segment accounts for 79% of North America revenue, and sales in this division grew by a staggering 35% last quarter. 

Source: Amazon.com.

That the online retail business is doing so well in North America is a major plus for investors, as it indicates that Amazon is far from reaching saturation point, a big positive when evaluating the company's market opportunity.

Improving profitability 
Investors have long been concerned about Amazon's razor-thin profit margins. The company is investing tons of money in areas such as logistics and infrastructure, digital content, and building its Amazon Web Services cloud computing business, and this has taken a big toll on profitability over the past several years.

However, things are clearly changing lately. Sales are outgrowing expenses, and AWS is a remarkably profitable business. These successes are allowing Amazon to deliver explosive growth in operating profits.

Source: Amazon.com.

It's all about the cash flows
Amazon's management has been quite clear to investors about its financial targets since the beginning. The company is all about maximizing cash flows in the long term, and cash flows are clearly moving in the right direction at an amazing speed. 

Operating cash flow during the year ended in September grew 98% $9.8 billion. The company produced almost $5.4 billion in free cash flows during the 12-month period ended in September, an explosive increase versus $1.1 billion in the same period last year.

Source: Amazon.com.

AWS on fire
Amazon's cloud computing segment is truly on fire, producing a jaw-dropping 78% increase during the third quarter to $2.1 billion. Operating income in this division grew 432%, and the business is producing massive profitability, with operating margins in the neighborhood of 25% of revenue.

Source: Amazon.com.

AWS currently accounts for nearly 7% of Amazon's total revenue. However, the segment will most probably keep outgrowing the rest of the business in the years ahead. Amazon is not only the leading online retailer in the world, but also a cloud-computing powerhouse, and this has material positive implications on both sales and profit margins over the coming years.

Andrés Cardenal owns shares of Amazon.com. The Motley Fool owns shares of and recommends Amazon.com and eBay. 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.