At Amazon.com (AMZN) - Get Report , cloud computing continues to shine.

With yet another solid quarter, Amazon is shifting toward profitability after years of posting loss largely due to its investments.

"They keep ramping, but what was interesting was the profitability," TheStreet's Jim Cramer said. "The Amazon web service is making a lot more money than people said."

Amazon.com's posted a strong quarter Thursday reporting revenue of $30.4 billion and EPS of $1.78. Wall Street was anticipating $29.55 billion of revenue and $1.11 of EPS.

Shares of the company spiked to a 52-week high of $766 mid-morning Friday after the stronge results after markets. Shares had closed Thursday at $752.61.

But the dramatic increases in stock prices may be exaggerated, Cramer said.

"Let's not get too carried away," he said. "And I am very pro-Amazon, but I just think the stock could rest here."

Amazon's cloud computing business, Amazon Web Services, proved its power yet again in Q2.

AWS had revenue of $2.9 billion, which represents a 58% increase year-over-year. While revenue growth may be slowing as the unit gains scale, its stellar performance underscores the fact that Amazon is still leading the pack in cloud against Microsoft's (MSFT) - Get Report Azure and Alphabet's (GOOG) - Get Report Google Cloud Platform. IBM (IBM) - Get Report , too, is a big player in cloud.

Alphabet is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells AMZN? Learn more now.

Amazon essentially created the cloud business model in 2006 by offering companies the ability to use its infrastructure to store data remotely. Since then, AWS has steadily emerged as the e-commerce empire's growth engine as the industry continues to shift toward the cloud due to speed and price efficiencies.

Despite a rush of entrants to cloud computing, Amazon has held its throne largely thanks to Jeff Bezos' playbook that hinges on aggressive investments for businesses that start to gain traction.

Despite its substantial size, the cloud division still grew 70% last year, generating about 48 billion in revenue.

U.S. retail revenue from its core business was also strong in Q2, growing about 28% year-over-year to $17.7 billion in revenue this quarter. It slightly beat consensus of $17.4 billion.

For its part, Amazon has been working aggressively to build its Prime Membership Program through adding new offerings such as private-label production and food delivery in an ambitious goal to become a one-stop shop for consumers.

Stock has enjoyed a solid run this year, having climbed up 11.4% year-to-date.