Technology giant Amazon has reported a loss of $57m (£38m) in the first quarter of 2015 and has also given more detail about the performance of its web services business.

The company said revenue from sales of Amazon web services (AWS) for the first three months of 2015 was $1.57bn.

Founder Jeff Bezos said in a statement: "Amazon web services is a $5 billion business and still growing fast."

Shares in the firm declined, but then rose nearly 5% in after hours trading.

The company reported a better-than-expected increase in revenue, which increased by 15% to $22.7bn, buoyed by increased sales in North America, the company's biggest market.

Furthermore, it said sales of its web services offering increased by 49% from a year earlier, and that it was profitable - which was something that was previously unknown.

AWS is a cloud computing offering that makes money by charging businesses to host their websites and other applications.

The division provides cloud computing services to household names including Dropbox, Spotify, Netflix, Uber, Samsung and even the CIA - helping them send notifications, stream video and synchronise data.

The figures for the first time confirm that Amazon's cloud business is the biggest of its kind in terms of revenue.

'Surprisingly profitable'

The profitability of the cloud business could soothe investors, who have been anxious for the firm to turn a profit and stop investing in new projects, which has seen them move into tablet computers, smartphones, and a short-lived nappy service.

AWS "was surprisingly more profitable than forecast", Dan Kurnos, an analyst at the Benchmark Company, told the BBC.

That "should help [Amazon] justify their heavy investment spending and provide a clearer path to profitability for the [overall] company as AWS grows," he added.

Michael Pachter, from Wedbush Securities said: "I think most of us believed that the business [AWS] was breakeven at best, and it is surprising that it generates such a significant portion of profit."

"The stock is up because it is clear that if that business scales, Amazon can be immensely profitable," he added.

Source: BBC