Both measures topped Wall Street's expectations. Analysts had forecast a profit of 16 cents per share on $2.81 billion in sales, according to a Thomson Financial survey.
"As you start on the revenue line and work your way down the income statement, I think it was just all-around strong," said Dan Geiman, an analyst at McAdams Wright Ragen. "They're in a sweet spot in terms of adding selection, adding convenience and lowering those prices, and I think it's starting to pay off for them."
In a conference call with investors, Chief Financial Officer Tom Szkutak said North America sales experienced the "highest growth rate in more than 6 years."
Revenue in the U.S. and Canada increased 38% to $1.6 billion. Electronics and general merchandise sales jumped the most -- 66% to $606 million. The category also includes toys, clothing, jewelry and sporting goods, but Szkutak would not say what types of items drove sales in the quarter. Instead, the executive pointed to the company's broad selection and the appeal of its $79-per-year unlimited shipping membership, Amazon Prime, to explain quarterly growth.
Analysts have long complained that free and cheap shipping promotions cut into Amazon's earnings. The retailer said its number of Amazon Prime members rose, but did not disclose a total. Shipping set Amazon back a net $75 million in the quarter.
Worldwide, revenue from electronics and general merchandise improved 55 percent to $970 million, while sales of books, music and other media-category products grew 27% to $1.83 billion. The retailer said a weaker dollar helped improve sales slightly.
Wall Street has kept tabs on the blistering rise in Amazon's technology spending in recent years, in part because the company gave few specific details about where the money was going. While spending on technology and content still rose 10% to $201 million, it slowed significantly from a year ago.
Jeff Bezos, Amazon's chief executive, declined to give analysts details Tuesday about two technology and content initiatives -- a partnership with TiVo that lets people download content from Amazon and watch it on their TVs, and a yet-to-launch digital music store.
Bezos did say he was pleased with the growing Web services business, which sells data storage and computing power to computer programmers. Twenty-five thousand programmers signed up in the quarter.
Steve Weinstein, an analyst at Pacific Crest Securities, said it's hard to tell whether Amazon's technology spending finally paid off in the quarter.
"They didn't really call those initiatives out as major drivers for the business," he said.
Amazon upped its revenue forecast for the full fiscal year to $13.80 billion to $14.30 billion, up from its earlier outlook for $13.4 billion to $14 billion.
For the current third quarter, Amazon said it expects revenue from $3 billion to $3.18 billion.
Wall Street is currently looking for full-year sales of $13.84 billion and third-quarter revenue to reach $3 billion.