Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Amazon said high spending on warehouses and video production would drag on profits in the holiday quarter, disappointing investors who are weary of roller coaster results from the e-commerce giant and sending its shares down 6 percent.

Amazon is racing to ship packages as quickly as possible by building out its own delivery system. It is making heavy U.S. investments as well as pouring funds into foreign markets, and it also is building out its home electronics and video businesses, aiming to make it difficult for customers to leave.

A doorman watches as USP delivery man Dion Seaberry delivers packages. REUTERS/Keith Bedford REUTERS

As a consequence, the Seattle-based company projects operating income in the fourth quarter would range from nothing to $1.25 billion, a wide span that is considerably below Wall Street's $1.62 billion, according to market research firm FactSet StreetAccount.

"Investments are going to be lumpy," Chief Financial Officer Brian Olsavsky said on an analyst call. "The second half of this year looks like a big step up compared to the first half - and it is."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Long known for heavy spending and losses, Amazon has come to turn a profit consistently, partly thanks to selling computer storage and services in the cloud. Companies globally are turning to Amazon, the market leader, and rival Microsoft Corp to host their data. In the just-ended third quarter, Amazon's cloud business grew sales by 55 percent from a year earlier.

But investors are focused on rising costs for the company's retail operation.

Anticipating more shoppers this holiday season, Amazon opened 18 warehouses in the third quarter and another five in the first few weeks of October, Olsavsky said.

Amazon grew its workforce by 38 percent in the third quarter.

In addition, the company has nearly doubled its spending on the creation and marketing of movies and TV shows in the second half of 2016. Amazon's hope is that people will sign up for its Prime service to watch these videos - and in turn buy more goods from Amazon to make the $99-per-year subscription worth it.

"Amazon tends to flex investment up and down somewhat unpredictably from time to time in order to drive growth, and that's what's challenging for investors," said analyst Jan Dawson of Jackdaw Research. "Some investors thought the new era of higher margins was here to stay permanently, and this quarter has likely taught them (otherwise)."

But investment is necessary to be competitive, particularly in video if established media companies withhold their content from the likes of Amazon, Dawson added.

Amazon's income tripled in the third quarter to $252 million, or 52 cents per share, marking the company's sixth straight profitable quarter. But analysts on average expected 78 cents, according to Thomson Reuters.

Amazon forecast net sales would rise as much as 27 percent in the current quarter to $45.5 billion.

"Even if it reaches the top end of these forecasts, this would still represent the worst performance in growth terms of this fiscal year," Neil Saunders, head of retail research firm Conlumino, wrote in a note.

"That said, over the longer term Amazon’s investment in physical should help it get a tighter grip on fulfillment costs," he added. "Amazon is playing the long game."