Amazon has surprised the market with a quarterly profit far better than anticipated for the online giant known for investing for the long term. Amazon posted earnings of $US214 million ($A275.88 million) in the fourth quarter as sales jumped 15 per cent to $US29.3 billion, swinging to profit after two consecutive losing quarters. Shares in Amazon shot up 8.5 per cent in after hours trading on Thursday following the release. The profit adjusted for special items amounted to 45 US cents per share,