Amazon beat revenue estimates but fell short on earnings in the second quarter, as it continued to invest in areas of growth.

The company's shares fell more than three percent in after-hours trading.

Here are the most important numbers:

EPS: 40 cents per share vs. $1.42 per share expected, according to consensus estimates from Thomson Reuters

Revenue: $37.96 billion vs. $37.18 billion expected, according to Thomson Reuters

Amazon Web Services (AWS) revenue: $4.1 billion vs. $4.08 billion expected, according to FactSet

"As investors, everyone knows that Amazon really doesn't care about the bottom line," Michael Yoshikami, founder of Destination Wealth Management, said on CNBC's "Closing Bell."

"What you're buying it for is top-line growth, revenue growth, market share — and I suspect when you go through the numbers you're going to see Amazon is making great progress," he said.

Sales jumped 25% year-over-year, but its profit took a big hit as the company keeps investing in a number of new areas, like video, fulfillment center and international expansion.