(NASDAQ:AMZN) reported better-than-expected first-quarter financial results after the market close on Thursday. Top-line growth continued to decelerate, but the company's recent focus on profitability is yielding big results.

The e-commerce giant generated revenue of $59.7 billion, up 17% year over year. This was near the high end of management's forecast and edged past analysts' consensus estimates, which topped out at $50 billion and $59.65 billion, respectively. 

Amazon delivered a significant earnings surprise, with operating income that climbed to $4.4 billion. That easily exceeded the high end of the company's forecasted range of $2.3 billion to $3.3 billion. Net income more than doubled, to $3.6 billion, resulting in earnings per share that soared 117%, to $7.09, far surpassing the $4.72 expected by analysts. 

A tractor-trailer truck with the Prime logo on the trailer.

Image source: Amazon.

Broad-based growth

Each of Amazon's operating segments produced solid growth. North American e-commerce sales grew 17% year over year, to $35.8 billion, while international sales of $16.1 billion grew 9%. Both segments expanded operating margins compared to the prior year.

Margins in North America grew to 6.4%, up from 3.7% in the year-ago quarter. Margins on international sales were essentially flat, an improvement from negative 4% this time last year.

Cloud computing continues to pay the bills, however. Amazon Web Services (AWS) grew revenue to $7.7 billion, up 41% year over year. Cloud margins continued to expand, growing to 29%, up from 26% in the prior-year quarter. AWS is now responsible for nearly 13% of the company's revenue and more than 50% of its operating income.

The "other" category, which primarily includes sales of advertising services, grew 34% year over year, to $2.7 billion. This business has become an area of greater focus for Amazon over the past year and topped $10 billion in revenue for the first time in 2018.

The company shares a laundry list of other information designed to illustrate other areas of Amazon's continued success. Two that may be of interest: Fire TV now has more than 30 million active users and Alexa -- which powers the voice-activated Echo smart speaker -- now has more than 90,000 skills.

Amazon stock was down slightly on the report, off about 0.4% in after-hours trading.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.