The holidays were kind to Amazon.
The online retail giant reported earnings Thursday that beat Wall Street's expectations, sending its stock jumping 8% after the closing bell.
Amazon (AMZN) earned $214 million, or 45 cents per share, in the fourth quarter. While that's a decline from the previous year, it was a lot more than the 18 cents that Wall Street analysts were expecting.
A strong online holiday shopping season helped Amazon report positive earnings, breaking a streak of losses that it reported in the previous two quarters.
Sales increased 15% to $29.3 billion, a hair below expectations.
Related: Woody Allen to create his first television series for Amazon
CEO Jeff Bezos said membership in Amazon Prime, which gives customers free shipping and other perks, increased 53% last year even though the price was hiked to $99 a year.
Amazon ran special promotions for Prime members during the fourth-quarter holiday shopping spree, including free last-minute shipping.
For the full year, Amazon brought in a whopping $89 billion in revenue, but reported a loss of $241 million in 2014.
Amazon is no stranger to red ink. It routinely posts quarterly losses or declining profits despite generating billions of dollars in sales.
The company's strategy is to make long-term investments at the expense of short-term profits. But investors seem to be losing patience. The stock fell more than 20% last year, but it bounced back a bit in January.
In general, Amazon's losses stem from its various new ventures, some of which have been more successful than others.
Related: Amazon wins Golden Globes for 'Transparent'
Just this month, Amazon signed a deal with Woody Allen to produce the director's first television series. That came after Amazon won two Golden Globes for its online streaming TV show "Transparent."
Amazon is also investing in new technology, including a drone delivery system and a 3-D printed products store. It introduced updates to its tablets Kindle e-reader tablets and launched an expanded grocery delivery service this year as well.
Not all of Amazon's bets have paid off. The Fire Phone, which Amazon unveiled with great fanfare last year, has been a flop.