Global online retail behemoth Amazon has moved to a profit in its second-quarter, sending its share price up, valuing it higher than Wal-Mart.