Amazon.com’s (AMZN) first-quarter earnings climbed 32% on stronger-than-expected revenue, although the online retail giant again posted a small profit amid hefty investments in video and other initiatives.

After Thursday’s closing bell, the company reported net income of $108 million, or 23 cents a share, compared to $82 million, or 18 cents a share, in the year-ago period. Revenue grew 23% to $19.74 billion.

Amazon matched Wall Street’s consensus estimate for earnings of 23 cents a share. Analysts were looking for revenue of $19.43 billion.

Seattle-based Amazon is known for spending heavily on new products, warehouses and streaming video, a practice that weighs on the company’s bottom line.

Amazon is also betting on its Prime subscription program, which includes free shipping and streaming video. The annual subscription rate for Prime was hiked to $99 from $79.

Amazon signed on this week to become the exclusive streaming provider of classic shows from Time Warner’s (TWX) HBO like “The Sopranos.” The company already had an exclusivity deal with 21st Century Fox (FOXA) to stream episodes of “24” ahead of the show’s return next month. 21st Century Fox is the parent company of FOX Business.

Earlier this month, Amazon said total video streams have nearly tripled year-over-year.

Amazon recently unveiled Fire TV, a new set-top box that connects to Prime Instant Video and other video apps. Chief executive Jeff Bezos forecasted strong demand, saying “the team is working hard to keep Fire TV in stock.”

First-quarter operating expenses jumped 23% to $19.6 billion, driven in part by costs tied to technology and content. Margins narrowed to 0.7% from 1.1%.

North America sales outpaced international results with a 26% gain, while operating income improved 23%. The international segment’s operating loss widened to $60 million from $16 million despite 18% sales growth.

For the second quarter, Amazon expects to record sales of $18.1 billion to $19.8 billion. Analysts were recently projecting $19.03 billion. The company sees an operating loss of $55 million to $455 million.

Shares of Amazon continued to rally in after-hours trading. The stock rose 1.9% to $343.41.

Follow Matthew Rocco on Twitter @MatthewRocco