Amazon.com Inc is thinking long-term when it spends heavily on the cloud, but investors may see a little more short-term rain when the online retailer reports its earnings on Tuesday.

The company has been willing to sacrifice some profitability to win customers and build its new businesses. It has invested heavily in areas such as cloud computing -- which allows companies to store data on its servers -- to take on its rivals Google Inc and Apple Inc.

Amazon is also laying out money to open new distribution centers and cement its lead as the world's largest online retailer.

But investors were unnerved by how much those costs dented Amazon's operating margin when it last reported quarterly results, on January 27. Its shares fell 9 percent on the report, just days after hitting a 52-week high of $191.60.

On average, Wall Street analysts expect Amazon to report a first-quarter profit of 61 cents per share, down from 66 cents a year earlier, according to Thomson Reuters I/B/E/S.

But they expect $9.51 billion in sales, which would be 33.4 percent higher than last year.

Many analysts believe that kind of growth justifies some short-term damage to profitability.

We expect Amazon will continue to take share in an accelerating growth environment and, despite near-term investment to meet accelerating growth demands, will ultimately benefit, Evercore Partners analyst Ken Sena wrote in a research note on Monday.

The company itself has told investors to expect lower margins in the short term. Amazon said in January that in the first quarter, its operating margin could drop to between 2.8 percent and 3.8 percent -- below its 5.5 percent margin for the first quarter of 2010.

Amazon has had some early success against its rivals in the cloud business. Last month, it introduced a music locker that allows people to store files on its servers. Apple and Google are believed to be working on similar projects, but Amazon beat them to the marketplace.

Last week, disruptions to Amazon servers that host Internet services took down several social networking websites including Foursquare. Amazon said the servers were all back up and running on Monday.

Despite such blips, that kind of initiative will set Amazon up for growth long term, analysts and investors said.

(Amazon) trades at a premium because it's becoming more of a dominant place in e-commerce, said Michael Koskuba, a senior portfolio manager at Victory Capital Management, which owns Amazon shares.

(Reporting by Phil Wahba; Editing by Gary Hill)