Amazon’s ability to turn a profit from the razor-thin world of online retail was once uncertain. The company, which decided to invest heavily in once-unorthodox areas like streaming video, hardware, and shipping networks, had to spend years convincing Wall Street that its plans would, eventually, bear fruit. During that time, Amazon struggled through occasionally harsh losses, while its cloud computing division grew steadily in the background but still struggled to make up the difference.

Amazon’s holiday sales came in under expectations

Investors don’t doubt the company quite so often anymore; this past quarter was Amazon’s seventh consecutive quarterly profit. But Amazon continues to ratchet up the spending, especially in areas like shipping, logistics, and fulfillment. Earlier this week, reports shed light on Amazon’s plans for a $1.5 billion air cargo hub in Kentucky for its more than 40 Prime Air planes.

These costs, among others, contributed to a bit of investor disappointment today, when the company’s revenue for the period between October and December of last year came in slightly under Wall Street expectations. Profit, on the other hand, was far higher than expected, indicating that Amazon’s investments in the types of industries that could cut its retail and shipping costs may be paying off after all.

The company’s fiscal fourth-quarter earnings for 2016, posted this afternoon, show a profit of $749 million, or $1.54 per share, on revenue of $43.7 billion. Both figures are substantially up from the same period last year, with sales increasing 22 percent and profit jumping 55 percent. However, analysts were expecting about $44.7 billion for Amazon’s holiday quarter. On profit, the company handily beat expectations of $1.35 per share. The disparity between expectations and reality for Amazon’s revenue caused its stock to slip by about 4 percent in after-hours trading.

The star of show, as has been the case for many quarters now, is Amazon Web Services. The company’s cloud computing division is its fastest growing profit driver, and AWS operating income for this past quarter increased by 60 percent to $926 million, from $580 million. The division, which rents out server capacity and hosts online operations for companies as large as Netflix and Spotify, earned $3.5 billion, up 46 percent from the same period last year. For each quarter in the last fiscal last year, AWS has earned more profit than Amazon’s entire North American retail division.

CEO Jeff Bezos, in prepared remarks, decided to focus on Prime, which the company says added tens of millions of new paid members in the past year. “Prime members can now choose from over 50 million items with free two-day shipping — up 73% since 2015. Prime Video is now available in more than 200 countries and territories,” Bezos said in a statement. “Prime Now added 18 new cities, which means millions more members now get one and two hour delivery. New benefits were also added to the list, like Prime Reading, Audible Channels for Prime, Twitch Prime and more.”

The company has also been playing up the success of its Alexa voice assistant and Echo line. “Alexa-enabled devices were the top-selling products across all categories on Amazon.com this holiday season,” Amazon wrote in its earnings report. “Customers purchased and gifted a record-setting number of devices from the Amazon Echo family with sales up over 9x compared to last holiday season.”