NEW YORK (TheStreet) -- Shares of Amazon.com Inc  (AMZN - Get Report) were spiking, sharply up 17.87% to $568.35 in after-hours trading Thursday, after the ecommerce giant reported a surprise profit in its latest quarterly earnings results.

For the second quarter ended June, Amazon earned 19 cents per share on revenue of $23.18 billion.

Both figures easily topped analysts' estimates of a loss of 14 cents a share on sales of $22.39 billion for the period, according to data compiled by Thomson Reuters.

Amazon's operating margin, a key metric, was 2% versus the 1.1% from last quarter. Operating expenses increased by 17% year over year to $22.1 billion.

Sales of Amazon Web Services, its cloud computing service, increased to $1.82 billion from $1 billion in the previous year.

Last week, the ecommerce giant held its first Amazon Prime Day in an attempt to recreate Black Friday savings in the summer.

S&P Capital IQ equity analyst Tuna Amobi said in a video interview with TheStreet that he was looking for revenue growth to come up to the higher end of the company's guidance of around 17% to 18% growth.

Amobi was expecting a "good quarter" given that it has outperformed Wall Street's expectations in the last several quarters.

Shares of Amazon are up more than 55% so far this year, as it currently trades near record levels.

Seattle-based Amazon.com is an e-commerce company that sells a range of products and services through its various owned and affiliated websites.

Insight from TheStreet's Research Team:

Amazon.com is a part of Bryan Ashenberg's GrowthSeeker.com Portfolio. Here is what Ashenberg had to say about the stock in a recent weekly summary:

Amazon.com (Consumer Discretionary -- AMZN:Nasdaq, $488.10, 41 shares, 4.13%; $550 price target): Amazon's shares rocketed 7% higher this week ahead of its second- quarter earnings release due on Thursday after the market close.

To be clear, expectations are sky-high for Amazon, which is quite a difference relative to how we went into the past few quarterly prints. Nonetheless, this week the markets forgot about Ray Romano and went with "Everyone Loves Amazon." On Tuesday, UBS upgraded the stock to a Buy rating from a Neutral, and increased its price target to $550 from $450. And on Monday, Wedbush raised the stock's rating to Outperform from Neutral and raised its price target to $575 from $435. Not wanting to be left out, Bank of America/Merrill Lynch joined the fray on Monday, bumping its target to $535 from $475 and reiterating its Buy rating.

We also saw Amazon flex the strength of its Prime membership muscles this week when it offered its Prime Day sale to mixed customer reviews. Some negative reviews notwithstanding (and we don't believe the negativity is warranted), Amazon says it sold more units on Prime Day than on the biggest Black Friday it ever had, as customers ordered 34.4 million items and bought a record number of Amazon-branded devices, such as Fire and Kindle. We believe these types of sales will be seen at least annually.

As we head into the quarterly print, we reiterate that even though we are not looking for Amazon to maximize near-term profitability, we believe a focus on profitability needs to continue to be in the forefront of management's efforts. Amazon's first- quarter results and the newfound information on the marked profitability of the Amazon Web Services segment lead us to conclude that the stock remains undervalued.

Despite the company's improved profitability -- and maybe even because of it -- we believe management will continue to spend heavily and invest to dominate the markets in which Amazon does business. And as AWS shows, management knows what they are doing and Wall Street will have to be patient.

We remain long-term bullish on the company as it continues to spend on growth initiatives, including Fire TV, Fire Phone, Prime Instant Video, Prime Music, grocery, international, Sunday delivery, Echo and new fulfillment and sorting centers that enable same-day delivery, at the expense of -- but not with total disregard for -- near- term profits.

- Bryan Ashenberg, 'Growth Seeker Weekly Summary' originally published 7/20/2015 on GrowthSeeker.com.

Want more information like this from Bryan Ashenberg BEFORE your stock moves? Learn more about GrowthSeeker.com now.

Separately, TheStreet Ratings team rates AMAZON.COM INC as a Hold with a ratings score of C. TheStreet Ratings Team has this to say about their recommendation:

"We rate AMAZON.COM INC (AMZN) a HOLD. The primary factors that have impacted our rating are mixed ,some indicating strength, some showing weaknesses, with little evidence to justify the expectation of either a positive or negative performance for this stock relative to most other stocks. The company's strengths can be seen in multiple areas, such as its solid stock price performance, robust revenue growth and largely solid financial position with reasonable debt levels by most measures. However, as a counter to these strengths, we also find weaknesses including deteriorating net income, disappointing return on equity and feeble growth in the company's earnings per share."

You can view the full analysis from the report here: AMZN Ratings Report

AMZN ChartAMZN data by YCharts