Amazon reported a huge beat on profits but a narrow miss on revenue for its second-quarter earnings on Thursday.

Amazon stock is up roughly 3 percent in extended trading.

Here are the most important numbers:

EPS: $5.07 vs. $2.50, as estimated, according to Thomson Reuters

$5.07 vs. $2.50, as estimated, according to Thomson Reuters Revenue: $52.9 billion vs. $53.41 billion, as estimated, according to Thomson Reuters

$52.9 billion vs. $53.41 billion, as estimated, according to Thomson Reuters AWS revenue: $6.1 billion vs. $6 billion, as estimated, according to FactSet

Amazon's net income saw a whopping twelve-fold increase from the year-ago period, to a record $2.5 billion, marking the third consecutive quarter of surpassing $1 billion in profits. Amazon's quarterly profit topped the $1 billion threshold for the first time in the fourth quarter of 2017.

The profit expansion is largely driven by the growth of Amazon's high-margin businesses, like cloud and advertising. Amazon CFO Brian Olsavsky said in a conference call that those two businesses were a "big contributor" to its profit growth, as Amazon's traditional retail business runs on thin margins. He also credited better efficiencies in Amazon's warehouses and data centers, as well as the growth of its higher-margin third party marketplace.

Amazon's cloud service re-accelerated its sales growth for the third straight quarter, to 49 percent year-over-year, despite increased competition from Microsoft and Google. Its $6.1 billion revenue was just 11 percent of Amazon's total sales, but its operating income of $1.6 billion accounted for 55 percent of the total.

Amazon's "other" revenue, which is mostly comprised of advertising sales, came in at $2.2 billion, up 132 percent from last year. This is the second-straight quarter of surpassing $2 billion in advertising revenue.

Amazon's total revenue, which includes sales from Whole Foods, increased 39 percent year-over-year. Its North America revenue jumped 44 percent to $32.1 billion, while international sales grew 27 percent to $14.6 billion.

Revenue guidance for the third-quarter fell short of Wall Street estimates. Amazon expects revenue in the range of $54 billion to $57.5 billion in the third-quarter, slightly below street estimates of between $55.6 billion to $62.2 billion. Sales from Prime Day, which took place in July, will be included in Amazon's third-quarter results.

In the second quarter, Amazon rolled out Prime member savings in all Whole Foods stores nationwide, while expanding Whole Foods delivery in more cities, including Chicago, Houston and San Antonio. Sales from Whole Foods, which was acquired a year ago, was roughly $4.3 billion during the quarter.

It also made its first official move into health care by acquiring online pharmacy PillPack and launched new initiatives like a service that delivers packages directly to the trunk of a customer's car.

Amazon continued to grow its workforce to a record-high 575,700 employees in the quarter. That's up 51 percent from last year, and a 2 percent increase sequentially.

Amazon CEO Jeff Bezos highlighted the growth of Amazon's voice-assistant Alexa, saying "tens of thousands" of developers use the service.

"We want customers to be able to use Alexa wherever they are," he said in a statement.