Amazon's earnings dipped because the e-commerce company says it spent more money on building out its distribution network and product development, but revenue came in strong as the company reported second quarter earning after the market's close Tuesday.

Amazon also beat the street estimates in both revenue and profits for the quarter.

Amazon's stock traded up in after-hours trading on the strong revenue for the quarter, jumping more than $6 to $220.96 after closing Tuesday at $214.18.

Amazon said it earned 41 cents a share in the second quarter on revenue of $9.91 billion. Analysts expected Amazon to report a second quarter profit of 35 cents per share, compared with 45 cents per share in the second quarter last year. Revenue was expected to increase to $9.4 billion, from $6.5 billion in the same period the previous year.

Amazon is expected to release its own tablet later this year, challenging Apple's iPad. The company is also expected to offer a new version of its popular Kindle e-reader, while also offering cheaper versions of the Kindle.