Amazon has reported a loss of $126m (£74m) in the second quarter and warned that sales could slow in the current quarter.
Amazon forecast third quarter sales of between $19.7bn and $21.5bn, which could mean sales growth of as little as 15% - well down on previous quarters.
Amazon has traditionally survived on thin profit margins, but investors have been reassured by strong sales growth.
But today's warning over sales has spooked investors.
In after hours trading in the US shares slumped by 6%.
Amazon has been investing heavily to build up its business, including the launch last month of its first smartphone - the Fire Phone.
It has been developing digital content including computer games and TV shows.
In its conference call the company said that producing its own TV shows would cost $100m in the third quarter.
Amazon has also been spending money on improving its delivery systems which includes expanding Sunday delivery to 18 cities in the United States.
Another major cost of Amazon has been the building of its Amazon Web Services business.
It provides computer services and storage for businesses and has been growing very quickly.
To match that growth Amazon has been investing heavily in infrastructure and has hired "thousands" of staff for the web services operation.
All that has contributed to a negative net income of $126m in the second quarter, which compares with a loss of $7m in the same quarter in 2013.
That loss came despite a 23% jump in second quarter sales to $19.3bn.