Shares of Amazon (AMZN - Get Report) were down 2.1% to $1,022.11 in after-hours trading on Thursday after the internet giant posted a substantial miss on its bottom line for the fiscal second quarter as it continues to invest heavily in areas such as fulfillment, original content and international expansion.

Adjusted earnings were 40 cents per share, which fell well short of Wall Street's expected $1.41 per share. Earnings were down 77% from the year-ago quarter. Revenue jumped 25% year-over-year to $37.9 billion, however, surpassing analysts' projected $37.2 billion.

The company's Amazon Web Services cloud platform continued to grow rapidly with sales of $4.1 billion, which was 42% higher than the $2.9 billion it generated in the year ago quarter. Wall Street was expecting cloud revenue to be $4.08 billion.

Amazon's spending has grown almost as rapidly as its income. During the quarter, Amazon's fulfillment spending rose 33% to $5.16 billion, while technology and content spending grew 43% to $5.55 billion. Marketing expenses increased 44% to $2.23 billion.

"Our teams remain heads-down and focused on customers," Amazon CEO Jeff Bezos said in a statement, adding that the company hired more than 30,000 new employees during the quarter and launched a range of new products including the touchscreen Echo Show. 

Amazon also gave upbeat guidance for the third quarter, saying that it expects sales to increase between 20% and 28% year-over-year. That would put third-quarter revenue in the range of $39.25 billion and $41.75 billion, while Wall Street is looking for sales of $39.98 billion for the quarter.

The mixed results come as CEO Jeff Bezos and his tech behemoth just hit two major milestones over the past few days. On Thursday morning, Bezos briefly unseated Microsoft (MSFT - Get Report) co-founder Bill Gates to become the world's richest man, proving that his net worth is skyrocketing just as fast as one of his Blue Origin rockets. On top of that, Amazon on Wednesday saw its market cap climb to $502.8 billion, putting it closer to hitting the highly-prized $1 trillion mark.

Amazon will provide a more in-depth look at its second-quarter results during a call with investors Thursday evening. Analysts are likely to ask about Amazon's pending $13.7 billion acquisition of Whole Foods Market (WFM) . Investors may also look to get more color on the health of Amazon Web Services, its expansion into international markets and other pursuits.

More of What's Trending on TheStreet: