The logo is seen at a company logistics center in northern France. (Pascal Rossignol/Reuters)

Profits at continued to nudge upward for the 10th consecutive quarter, even as the online shopping giant spent more on marketing, technology and warehouses.

The financial results topped analysts' predictions and sent shares soaring by more than 7 percent in after-hours trading.

The Seattle-based tech giant, which has more than half a million employees, said Thursday that revenue grew 34 percent, due in part to the company's recent purchase of Whole Foods Market. (Jeffrey P. Bezos, the founder and chief executive of Amazon, owns The Washington Post.)

Amazon Web Services, the company's cloud business, continued to be an important source of revenue. It brought in $4.6 billion during the third quarter, up from $3.2 billion a year earlier.

Overall profit margins, however, narrowed during the quarter as Amazon continues to invest in new warehouses and international expansion in countries like India, while also lowering prices to compete with retailers such as Walmart ahead of the crucial holiday season.

"Margins . . . remain challenged," Charlie O'Shea, an analyst for Moody's, wrote in an email. "In addition to heavy investment, heavy promotions are occurring in the U.S."

Amazon looked to take on new markets during the quarter, muscling its way into the grocery business with its $13.7 billion acquisition of Whole Foods Market. Amazon executives said they have spent the past two months merging the enterprises — adding Amazon Lockers to Whole Foods stores, for example, and offering Whole Foods-branded foods for sale at

"Over time, you will see more cooperation between Amazon Fresh, Prime Now and Whole Foods as we explore new ways to serve the customer," Brian Olsavsky, Amazon's chief financial officer, said Thursday evening in a call with analysts.

"You will see more expansion from us," he added. But "we're not ready to announce what that will look like."

Amazon was equally coy about its interest in selling pharmaceuticals. On Thursday, the St. Louis Post-Dispatch reported that Amazon had received approval to sell wholesale pharmaceuticals in at least a dozen states. That news sent the stock price of U.S. pharmacy chains and drug wholesalers tumbling. Shares of Express Scripts fell nearly 4 percent.

Amazon executives, during the call with analysts, declined to confirm or deny the news, saying instead that they plan to concentrate on "experimenting with a lot of new formats."

The company spelled out a long list of new products it had rolled out in the quarter. The parade continued earlier this week when the company announced Amazon Key, a new in-home delivery service for Amazon Prime members. Beginning next month, shoppers can choose to give couriers permission to unlock their front doors and deliver packages inside their homes.

Overall for the three-month period ending Sept. 30, profits totaled $256 million, or 52 cents a share, up slightly from $252 million, or 52 cents a share, a year earlier.

Revenue, meanwhile, climbed to $43.7 billion, up from $32.7 billion a year earlier. Newly acquired Whole Foods Market accounted for $1.3 billion in third-quarter sales.

Amazon generated 59 percent of its sales in North America, where it is scouting a site for a second company headquarters. The company says it has received 238 proposals, and that it plans to invest $5 billion in the new campus.

The company said it now has 541,900 full- and part-time employees, up 77 percent from a year earlier. About 87,000 work for Whole Foods.