U.S. stock indexes rose sharply despite a sales warning from Amazon adding to concerns that the U.S. economy is slowing.