Amazon reported a boost in its quarterly profits Thursday and exceeded revenue estimates, sending the company's stock up in after-hours trading.