Recession fears dragged the S&P 500 and the Nasdaq Composite into a bear market last year, and neither index has yet recovered. But every past bear market eventually ends in a new bull market, and there is no reason to believe this one will break the pattern. In other words, the next bull market is most assuredly on its way.

In the meantime, e-commerce stocks Amazon (AMZN -1.14%) and MercadoLibre (MELI -1.98%) are trading at attractive prices, creating a good buying opportunity for investors. Let's take a look at why these two growth stocks are worth getting hold of.

1. Amazon

Amazon has struggled with a variety of economic challenges. Operating expenses related to its logistics network and data center footprint increased due to the rising cost of fuel and electricity, and revenue growth slowed across its retail, cloud computing, and digital advertising segments as consumer and business spending patterns changed in response to high inflation.

The financial consequences of those headwinds were not pretty for Amazon. Fourth-quarter revenue increased just 9% year over year to $149 billion, and the company reported a net income of $300 million, down 98% from $14.3 billion in the prior year. Those results are undeniably disappointing, but investors should consider them in context.

First, Amazon incurred a $2.3 billion loss on its investment in Rivian during Q4 compared to an $11.8 billion gain in the same period last year. Excluding the impact of that investment, net income actually increased slightly in Q4. Second, Amazon faces unprecedented headwinds from the worst bout of inflation in four decades, but business and consumer spending will rebound on the heels of an economic recovery. Third, near-term complications aside, Amazon still benefits from a strong presence in three growing markets.

Specifically, Amazon accounts for nearly 38% of retail e-commerce sales in the U.S., and it operates the most visited online marketplace in the world. Amazon Web Services (AWS) holds a 34% market share in cloud infrastructure and platform services, more than competitors Microsoft and Alphabet combined. And Amazon used the popularity of its marketplace to become the fourth-largest digital advertiser in the world, and it's taking share from the industry leaders.

Looking ahead, Ameco Research says global e-commerce spending will increase by 13% per year to reach $15 trillion by 2030. Grand View Research says cloud computing spend will increase at 15% per year to reach $1.6 trillion by 2030. And Precedence Research says digital advertising will increase at 9% per year to reach $1.3 trillion by 2030. That points to strong revenue growth for Amazon. Better yet, cloud computing and digital advertising are much higher margin businesses than retail, which means Amazon should be able to grow its bottom line even faster than its top line.

On that note, Amazon stock currently trades at 2 times sales, a discount compared to the five-year average of 3.7 times sales. That creates a great buying opportunity for patient investors.

2. MercadoLibre

MercadoLibre operates the largest e-commerce and digital payments ecosystem in Latin America. Its online marketplace receives nearly four times as many monthly visits as the next closest shopping destination, and it accounted for 21% of all retail e-commerce sales in Latin America last year, according to eMarketer. Meanwhile, its fintech platform (Mercado Pago) is the third most popular digital wallet among Latin American consumers.

Building on that, MercadoLibre offers value-added services to reinforce its strong presence in both markets. The company provides financing, logistics, and digital advertising solutions to merchants, and it provides loans, credit cards, and asset management solutions to consumers. Those products make its core commerce and fintech platform more compelling, and each new user adds momentum to the network effects that power its ecosystem.

Financially, MercadoLibre is growing at a fantastic pace. Q3 revenue increased 45% to $2.7 billion, driven by a particularly strong performance from its fintech business, and generally accepted accounting principles (GAAP) net income increased 33% to $2.56 per diluted share. Those results are particularly impressive given the current state of the economy, but MercadoLibre is well positioned to accelerate growth when consumer spending rebounds.

Latin America has one of the fastest-growing internet penetration rates in the world, and that catalyst should translate into a rapid uptick in online shopping and digital payments in the years ahead. In fact, eMarketer estimates that Latin America was the second-fastest-growing e-commerce market worldwide in 2022, which implies strength in digital payments as well.

Meanwhile, MercadoLibre's three largest geographies -- Brazil, Argentina, and Mexico -- rank among the six fastest-growing digital ad markets in the world. That creates another opportunity for the company, much the same way Amazon has used the popularity of its marketplace to build a thriving digital ad business.

Currently, shares trade at 6.2 times sales, a big discount compared to a five-year average of 12.7 times sales. That's why this growth stock is a buy.