New York CNN Business  — 

Amazon’s revenue during the three months ended in June blew away Wall Street projections, as the company continued to experience a surge in demand due to the coronavirus pandemic.

The online retail giant on Thursday generated $88.9 billion in revenue during the second quarter, up 40% from the same period a year earlier and well above the $81.6 billion analysts had expected. Net income doubled during the quarter to $5.2 billion, despite the company’s more than $4 billion investment in managing the coronavirus pandemic during the quarter.

Amazon (AMZN) stock jumped more than 4% in after-hours trading Thursday.

“This was another highly unusual quarter, and I couldn’t be more proud of and grateful to our employees around the globe,” said Amazon CEO Jeff Bezos said in a statement Thursday.

Amazon said its investment in coronavirus measures during the quarter included funds for purchasing protective equipment for employees and enhancing warehouse cleaning as well as adding family care benefits and paying out bonuses to front-line warehouse and delivery workers.

In April, Bezos told shareholders to “take a seat” when he announced the company’s plan to reinvest billions in coronavirus-related expenses. Analysts said the investments may have been an effort to avoid employee unionization efforts, which would likely cost the company more in the long run. The company previously came under fire after warehouse workers said the company wasn’t doing enough to protect their health.

Amazon’s North America sales, in particular, grew 43% year-over-year to $55.4 billion, as consumers continued to rely on online shopping during the pandemic. And the resurgence of coronavirus cases across the United States is likely to “support continued strong order patterns at Amazon,” according to Monness Crespi Hardt analyst Brian White.

“Amazon has proven irreplaceable in delivering the daily necessities to people around the world during this crisis, attracting more customers to the platform, expanding the list of products purchased by existing customers and accelerating the shift to ecommerce at large,” White wrote in an investor note earlier this week.

Revenue from Amazon Web Services, the company’s cloud computing business and single biggest profit driver, grew nearly 29% to $10.8 billion in the quarter.

Amazon’s earnings report comes just a day after Bezos testified on Capitol Hill alongside the CEOs of Apple, Facebook and Google as part of a congressional antitrust probe. During the hearing, Bezos acknowledged that Amazon may have improperly used third-party seller data to inform its own product decisions — a key concern over the company’s approach to competition.

Still, analysts say it’s unlikely the antitrust investigation will have any immediate impact on the company, if at all.

Amazon expects sales to grow between 24% and 33% during the upcoming third fiscal quarter to between $87 billion and $93 billion.