New York CNN Business  — 

Amazon’s profit machine shows little sign of slowing down.

The company said Thursday that it made a record $3.6 billion in profit for the first three months of 2019, more than doubling from $1.6 billion in the year prior. This marks the sixth straight quarter in which Amazon’s profits have topped $1 billion and the fourth consecutive quarter of record profits.

Shares of Amazon (AMZN) initially rose 3% in after-hours trading Thursday following the earnings report, before giving up some of the gains.

For years, Amazon was known for bleeding money as it invested heavily in its businesses and rapidly increased revenue. Now it has entered a new era with comparatively sluggish sales growth, but a consistently profitable business.

The steady increase in Amazon’s profits is all the more remarkable given how it continues to pour money into fulfillment centers, premium video content, bricks and mortar stores and healthcare. For competitors, the only thing scarier than an Amazon willing to lose money while making these costly investments is an Amazon that can make all these bets without going into the red.

Amazon posted revenue of nearly $60 billion for the quarter, an increase of just 17% from the year prior, its lowest growth rate since 2015. The slowdown comes as Amazon runs up against the law of large numbers.

Its long streak in the black has been fueled by the traction of high-margin businesses, including cloud computing and advertising.

Amazon Web Services, which remains the leader in the fast-growing cloud computing market, saw sales surge 41% from the prior year to $7.7 billion, even as it faces stiff competition from Microsoft (MSFT). The segment now accounts for about half of Amazon’s operating income.

The company has also built a multi-billion dollar advertising business to compete with the likes of Facebook and Google. Amazon’s “other” revenue category, which is said to be primarily made up of advertising services, generated $2.7 billion in revenue for the quarter.

But growth in its ad business slowed noticeably in the quarter. Revenue for the category increased by 34% from a year earlier, whereas revenue had more than doubled year-over-year in the first quarter of 2018.