Wall Street is stunned over Amazon's impressive June quarter earnings results.

Analysts say they are growing more confident in Amazon due to its increasing ability to generate more profits from its key opportunities.

The e-commerce juggernaut said Thursday it generated second-quarter earnings per share of $5.07, crushing the $2.50 Thomson Reuters consensus. Operating profit margin came in at 5.6 percent versus the 3.2 percent FactSet analyst estimate for the quarter.

Its shares closed up 0.5 percent Friday after the report.

Goldman Sachs reiterated its buy rating on Amazon shares, citing the company's rising profit margins.

"Amazon reported 2Q profitability well above consensus forecasts, with operating income margin expanding 400bps yoy driven by AWS, advertising, and fulfillment efficiencies," analyst Heath Terry said in a note to clients Thursday. "Guidance for 3Q operating income was also meaningfully above consensus forecasts. … We continue to believe that we are in the sweet spot between Amazon investment cycles where new fulfillment/data centers are driving accelerating growth while incremental capacity utilization and efficiency is driving margin expansion."

Terry raised his price target to $2,300 from $2,100 for Amazon shares, representing 27 percent upside to Thursday's close.

J.P. Morgan reaffirmed its overweight rating for Amazon stock, noting the rising importance of the company's cloud computing and advertising businesses to its earnings.

"Leverage in the AMZN model is coming through. Significant profitability upside in both 2Q results & the 3Q guide was driven by fast growing, high margin AWS & advertising, along w/greater efficiencies in the core," analyst Doug Anmuth said in a note to clients Friday.

Anmuth raised his 2018 Amazon operating profit margin forecast by 1.5 percentage points to 4.8 percent. He also increased his price target to $2,200 from $1,900 for the stock.

One Wall Street analyst believes the company rising profitability is here to stay.

Nomura Instinet reaffirmed its buy rating for Amazon shares, saying the internet giant may be able to squeeze more profits from its other expenses too.

"We continue to believe the composition of AMZN's sales growth signals its future margin trajectory, putting it on a march to increasing (& underappreciated) profitability, w/2Q18 representing the company's largest margin expansion in ~two years," analyst Simeon Siegel said in a note to clients Thursday. "As such, we wonder whether AMZN has actually reached a size that makes it difficult to 'outspend' sales growth, suggesting that, looking ahead, leverage could come from GM and SG&A."

Siegel raised his price target to $1,990 from $1,755 for Amazon shares.

Here's a roundup of what analysts are saying about Amazon.