Warren Buffett is known for choosing quality stocks that can weather any market environment -- and even if they suffer at times, they usually win over the long term. That's helped him, as chairman of Berkshire Hathaway, beat the market over a period of 57 years. Berkshire Hathaway has delivered a compounded annual gain of 19.8% during that period, compared with 9.9% for the S&P 500.

As we head toward a new bull market, Buffett's portfolio, as a whole, should continue to serve him well -- but there's one particular stock that could stand out and offer him a big boost. I'm talking about e-commerce and cloud computing giant, Amazon (AMZN 3.43%). Let's talk about why this player could soar – and why you may want to follow the billionaire investor into the stock right now.

An exciting turning point

Amazon has reached an exciting turning point after some tough times. Last year, rising inflation weighed on the company's costs and its customers' wallets. Meanwhile, Amazon's move to double its fulfillment network in a short period of time left it with excess capacity. As a result, the company reported its first annual loss since 2014.

But, as all of this unfolded, Amazon already was working on turning things around, and that was by tackling the company's cost structure. Amazon cut jobs, improved efficiency across the fulfillment network, and closed businesses that weren't working -- such as telemedicine service Amazon Care.

The company also supported Amazon Web Services (AWS) customers who, because of the economic situation, found themselves with smaller budgets for cloud services. Amazon directed them to lower-priced chips and helped them temporarily minimize spending. By doing this, Amazon was able to keep those customers loyal -- and ready to spend more once budgets allow.

Earlier this year, Amazon's efforts already started to bear fruit from an earnings and share performance perspective. Amazon reduced its outflow of cash, and operating income increased in the first quarter. And in the first half of the year, the shares delivered a 55% gain.

By the second quarter, free cash flow shifted to an inflow of $7.9 billion for the trailing 12 months, and Amazon reported net income of $6.7 billion compared with a loss in the year-earlier period.

Launching new projects

And, importantly, the company started to see a change in customer behavior at AWS, the business that generally has driven profit at Amazon. AWS customers, instead of focusing on cutting costs, have started to launch new projects requiring cloud services. Amazon, reporting a 12% increase in AWS revenue, said it's started to see the growth rate stabilize.

So now let's get back to my original point: Why will Amazon soar in a bull market? As mentioned above, Amazon has made major efforts to control costs, focus on growth areas, and improve its use of its fulfillment network. The company already has started to benefit, but it should benefit even more from all of this as the market shifts into a period of optimism and growth.

And Amazon also should excel because it's already a leader in the areas of e-commerce and cloud computing -- two markets set to expand in the double digits this decade.

A look at Amazon's valuation shows us the stock trades for 63 times forward earnings estimates. That may not seem dirt cheap, but it's actually pretty reasonable when you consider Amazon's unique market position, successful recovery, and future prospects. The company has what it takes to grow significantly over time -- something that surely pleases long-term investor Warren Buffett.

All of this means that, even after the gains so far this year, Amazon still has plenty of room to run over the long haul. And in a favorable environment such as a bull market, this stock could soar -- offering a lift to Buffett's portfolio and to yours.