Amazon CEO Jeff Bezos. Mike Segar/Reuters Amazon just reported its 2016 first-quarter earnings on Thursday after the bell.

It's a huge beat across the board, and the stock is up 12% in after-hours.

Here are the most important numbers:

Earnings per share: $1.07 vs. $0.58 estimated.

$1.07 vs. $0.58 estimated. Revenue: $29.1 billion vs. $27.99 billion estimated — up 28% year-over-year.

$29.1 billion vs. $27.99 billion estimated — up 28% year-over-year. Amazon Web Services revenue: $2.57 billion vs. $2.53 billion estimated — up 64% year-over-year.

$2.57 billion vs. $2.53 billion estimated — up 64% year-over-year. Operating cash flow: $11.3 billion, up 44% from $7.8 billion last year.

Amazon, known for investing in growth at a loss, swung to its fourth consecutive profitable quarter, reporting $513 million in net income. That's the largest profit ever for the company, and a huge jump from the $57 million loss it recorded last year.

AWS, its cloud business, drove the growth, seeing a 64% year-over-year revenue increase this quarter. AWS is now the most profitable business at Amazon, surpassing its North American retail business' operating profit of $588 million.

Amazon gave revenue guidance in the range of $28 billion to $30.5 billion for the second quarter, which at its midpoint is higher than street estimates of $28.3 billion. Operating income is expected to range in between $375 million and $975 million next quarter.

CEO Jeff Bezos noted in a statement that the Fire tablets doubled their sales compared to last year. He also added that Amazon's struggling to keep Echo in stock because of high demand. Amazon doesn't disclose sales figures for individual hardware products.

Shipping costs grew to $3.3 billion, up 42% from the same quarter last year. That's the highest year-over-year growth rate it's seen in over a year. Amazon's rising shipping cost has been a concern for investors, and the company has been rumored to be building its own logistics network to handle delivery on its own.

Amazon was one of the best-performing stocks last year, nearly doubling its market value in 2015. Although it's still reporting tiny profits, it passed $100 billion in annual revenue for the first time last year.