The COVID-19 pandemic has forced the U.S. economy into a full-blown recession and has pushed the unemployment rate above 10%. Like every other recession, no one knows how long this one will last or how deep it will end up being.

But despite the economic uncertainty, it's not time to put off investing. On the contrary, some companies are actually thriving during the current recession, including Amazon (AMZN -1.14%) and Shopify (SHOP 0.14%). Here's why investors should consider snatching up these two tech stocks right now. 

A room with computer servers.

Image source: Getty Images.

1. Amazon 

Amazon has received a lot of attention lately because its massive e-commerce platform saw a spike in demand from stay-at-home mandates earlier this year. This initially strained the company's delivery services, but it has actually helped the company grow. 

Amazon reported its second-quarter results on July 30 and the company's earnings blew past analysts' consensus earnings and revenue estimates. Amazon posted earnings of $10.30 per share, easily outpacing the $1.46 per share Wall Street was expecting. Sales also spiked 40% year over year to $88.9 billion, beating the consensus analyst estimate of $81.56 billion. 

Amazon's impressive second quarter came as the company benefited from both increasing retail sales and growth from its Amazon Web Services cloud computing segment. North American e-commerce sales jumped 43% to $55.4 billion and AWS revenue jumped 29% to $10.8 billion. The company makes most of its profit from its AWS segment, which brought in $3.4 billion in operating income in the quarter, compared to $2.1 billion for the company's North American retail sales. 

Both Amazon's e-commerce platform and its cloud computing segment are growing because people are spending more time online. Many brick-and-mortar stores are still closed, and many consumers are avoiding ones that are open in favor of online shopping. Similarly, AWS is growing as more businesses expand their online services to meet the increasing demand for remote workers and the growing e-commerce market. With no end in sight for the pandemic or the recession, AWS and Amazon's e-commerce platform will likely continue to grow.

A person using a laptop.

Image source: Getty Images.

Shopify 

Just like Amazon, Shopify is benefiting from the shift to e-commerce. The company makes an online platform that allows businesses of all sizes to create e-commerce stores. Shopify was already thriving long before the pandemic, but it's managed to grow even more since the virus brought an economic downturn.

Shopify reported a 97% spike in sales in the second quarter to $714.3 million, which was $200 million more than analysts were expecting. The dollar value of orders processed on Shopify's platform, called gross merchandise volume (GMV), also skyrocketed to $30.1 billion in the quarter, up 119% year over year. 

On the third-quarter earnings call, Shopify's Chief Operating Officer Harley Finkelstein put the recent surge in Shopify's e-commerce sales into context, saying, "Over the past few months, we've seen the COVID-19 pandemic fundamentally shift the way businesses and consumers interact. It has catalyzed e-commerce, introducing major changes in buyer behavior and pulling forward what retail would look like in 2030 into 2020."

With the e-commerce acceleration already underway, Shopify is poised to continue benefiting. E-commerce sales in the first quarter of this year accounted for just 11.5% of total U.S. retail sales, meaning that Shopify's platform has a lot more room to grow as more businesses shift their attention to e-commerce.

Don't forget this

While Shopify and Amazon will likely make great long-term investments, there will probably be some volatility ahead in the market. The stock market has been on a tear since mid-March, but there's no guarantee that it will continue this streak without a correction. Regardless, investors should remember that Shopify and Amazon are leaders in their respective markets. The long-term potential of both companies remains very strong.