Market downturns aren't selective. They don't just drag down the stocks of struggling companies. Instead, they impact most players -- even the strongest. And that's why there's one positive point about a market sell-off -- the opportunity to pick up solid stocks for bargain prices.

The stock I'm thinking of right now is one that has posted tremendous gains over time. It actually reached a record high of more than $3,600 late last year. And just a few weeks ago, the company completed a 20-for-1 stock split.

This stock also happens to be a leader in two major markets -- cloud computing and e-commerce. Which company am I talking about? None other than Amazon (AMZN -2.09%). Let's look at why it's a stock to buy now and hold forever.

$1 trillion for the first time

First, let's look at the business we all think about whenever we hear the word "Amazon" -- and that's e-commerce, which is a growing market. In the U.S. alone, e-commerce sales are expected to reach $1 trillion this year for the first time, according to an Insider Intelligence report. Amazon will account for about 37% of U.S. e-commerce sales this year, the data shows. Of course, the company also serves customers around the world, so Amazon benefits from market growth there, too.

Amazon's e-commerce business has helped it to report revenue and profit in the billions of dollars over the past few years. But this business also makes it vulnerable to today's biggest problems -- higher inflation and supply chain issues. These challenges weighed on the company's first-quarter earnings as Amazon reported decreases in operating cash flow and operating income.

This bad news has hurt Amazon's stock performance, and declines in the general market have dragged the shares even lower. As of now, Amazon shares are down more than 30% so far this year.

Even the recent stock split didn't offer Amazon a boost. A stock split doesn't change anything fundamental about a company or its stock. But by issuing more shares to current holders, the company lowers the price of each individual share, which makes the stock more accessible to a broader range of investors.

Now, here's some good news. The challenges Amazon faces right now are temporary. And they are external problems. If Amazon limits the impact of these problems, the company has what it takes to return to major growth once the headwinds ease.

The costs Amazon can control

Here's why I'm confident Amazon can do this. The company is focused on managing the costs it can control -- like those linked to productivity. These represent two-thirds of incremental costs. Another important point: Amazon's cloud computing business still is growing.

Amazon Web Services' (AWS) sales and operating income rose in the double digits in the first quarter. Inflationary pressures and supply chain troubles pose less of a problem for AWS than for the e-commerce business, so AWS should continue to show strength. AWS also is the worldwide market leader -- and traditionally has been a key profit driver for Amazon.

As for e-commerce, the future prospects look bright. As mentioned earlier, the market is growing, and Amazon is a leader. Amazon's Prime membership program is a clear growth driver. Members pay a fee for a wide variety of benefits, including free same-day and one-day delivery. It's in their best interest to do as much of their shopping as possible on Amazon. The company has added millions of members to the program in recent quarters and says membership-renewal rates remain high.

Why buy now?

Why buy Amazon right now? Amazon trades for about 130 times forward earnings estimates. That's down from 200 at the start of the year. At the same time, Amazon's revenue still is growing. Net sales climbed 7% to more than $116 billion in the first quarter.

At this level, Amazon looks like a bargain, considering its prospects in the e-commerce and cloud computing markets. Once the company gets through this rough period, both of these businesses are likely to lift total revenue -- and profit. This growth should last well into the future -- and that's why you may want to hold onto Amazon forever.