Looking ahead, the world's largest online retailer said it expects operating profit between US$1.4 billion and US$2.4 billion for the third quarter, up from US$347 million a year earlier.
Total net sales for the second quarter rose 39 percent to $52.89 billion, missing the average analyst estimate of $53.40 billion.
Amazon's quarterly profit soared past $2 billion for the first time, bolstered by continued growth in its online shopping, cloud computing and advertising businesses.
Amazon shares went from falling 2.3% at market opening, and being the second-biggest drag on the Nasdaq and S&P after Facebook lost $120bn in market value, to rising by more than 4% in after-hours trading.
While it fell short of Wall Street expectations, the overall result came as a relief for the tech sector, which had been reeling from a profit-warning Wednesday from Facebook.
RJ Hottovy, an equity analyst at Morningstar Inc., said Amazon profit also got a boost from more sales by independent merchants on its site, where the company gets commissions without the cost of buying inventory. Second-quarter operating expenses rose 34 per cent to US$49.9 billion.
This marks the 13th consecutive quarter of profits for Amazon, which didn't turn a profit for years as it reinvested in its business.
Profits hit a record $2.53bn (£1.9bn) in the three months to the end of June - about 12 times more than it made during the same period a year ago.
Amazon's stock has more than tripled in the past three years, making Chief Executive Officer Jeff Bezos the richest person on the planet.
Amazon's momentum has been strong enough to sustain Twitter broadsides from U.S. President Donald Trump, who has accused Amazon of freeloading off the U.S. Postal Service and using the Washington Post as a lobbying tool against antitrust criticism.
The company said it now expects third-quarter sales of between US$54 billion and US$57.5 billion, up from US$43.7 billion a year earlier.
But Amazon's eye-popping growth has also led to increased scrutiny over the possibility that the company's market dominance gives it monopoly power. "We're really pleased with the retail growth", Olsavsky said, "We think it's driven by the Prime program and the engagement of Prime customers as well as increased selection, particularly third-party selection".
The company's "other" category, said to consist "primarily" of advertising services hit almost $2.2 billion in sales for the quarter, up 132% from the same period a year prior.
For the latest quarter, Amazon's global business losses narrowed to $494 million, compared with $724 million previous year. Ives called this a "potential game changer" as Amazon continues to invest heavily in fulfillment centers, new stores and pricey content deals.