SAN FRANCISCO (AP) - Amazon.com Inc. on Thursday reported a surprise loss in the second quarter, as higher revenue was not enough to make up for rising operating expenses. The world's largest online retailer has been spending heavily on order fulfillment and digital content rights, which continue to weigh on profit margins. Amazon has long focused on spending the money it makes to grow its business and expand into new areas from movie streaming to e-readers and even grocery delivery. Investors have largely forgiven thin profit margins and zeroed in on the company's solid revenue growth and long-term prospects. But such patience won't last forever. Seattle-based Amazon's stock fell $8.20, or 2.7 percent, to $295.20 in extended trading after the results came out. BGC Financial analyst Colin Gillis said that while investors have been "rewarding Amazon for its investment cycle," the clock is ticking and Wall Street is looking to start reaping the rewards. Amazon, which also makes the Kindle tablets and e-reader devices, lost $7 million, or 2 cents per share, in the April-June quarter. That's down from earnings of $7 million, or 1 cent per share, a year ago. Revenue rose 22 percent to $15.7 billion. Analysts, on average, were expecting earnings of 5 cents per share on revenue of $15.73 billion, according to a poll by FactSet. Amazon's operating expenses rose 23 percent to $15.63 billion from $12.73 billion a year ago. Youssef Squali, an analyst at Cantor Fitzgerald, thinks that the weaker-than-expected per-share results were probably due to higher technology and content costs, "probably mostly related to Instant Prime," Amazon's video streaming service. Like eBay Inc., Amazon saw weaker results from its international business than in the U.S., as the rocky European economy weighed on revenue growth. North American revenue grew 30 percent to $9.5 billion. International revenue, meanwhile, increased 13 percent to $6.21 billion. Jefferies analyst Brian Pitz said the North American revenue growth was "well above" his and Wall Street's expectations, while international fell short. Paid unit growth, a closely watched figure, was 29 percent. This figure refers to the physical and digital goods that Amazon and its third-party sellers sell on its sites worldwide, excluding returns and cancellations. Pitz said he believes this was "generally in line" with Wall Street's expectations. For the current quarter, Amazon is forecasting revenue of $15.45 billion to $17.15 billion. Analysts were expecting $16.97 billion. Pitz noted that the company "usually guides fairly conservatively."