Warren Buffett doesn't bet on the market for just a year or two. The billionaire has made his fortune by investing in great companies and holding them for the long term. If you follow his lead, the idea is you benefit over time from a business' growth -- and in some cases from dividend payments too. So, it's key to choose companies that have solid prospects well into the future.

Two that fit the bill are Amazon (AMZN -2.56%) and Coca-Cola (KO 2.14%). They both are quite different from each other. Amazon is a younger company focused on growing its business -- and it doesn't pay a dividend. Coca-Cola is a long-established giant that investors flock to for its history of earnings and dividend growth. But the future looks bright for both of these colossal Buffett stocks. That's why it's a great idea to buy them in 2023 and hold forever.

1. Amazon

Amazon offers investors a major buying opportunity today. The current economic climate has weighed on Amazon's earnings. That's left the shares down -- and trading near their lowest in relation to sales since about 2016.

Yes, the company's going through a difficult period. Costs have increased due to higher inflation. And Amazon's rapid investment in its fulfillment network might have been too much too soon. The company found itself with more capacity than it needed. But Amazon is working to improve efficiency -- and it's cutting costs and increasing investments in growth areas to prepare for the future.

These efforts should pay off. It's important to remember today's troubles are temporary. And Amazon is a leader in the high-growth areas of e-commerce and cloud computing. Once economic troubles ease, Amazon's earnings growth should resume.

Amazon's cloud business -- Amazon Web Services (AWS) -- continued to grow sales in the double digits in the fourth quarter. Even if this growth slows as customers cut costs, AWS says its stream of new customers is "healthy and robust." That's a great sign for the future.

Amazon also has a long track record of revenue growth -- even in the difficult fourth quarter net sales advanced 9%. The company's return on invested capital also has generally increased until recent times.

AMZN Return on Invested Capital Chart

AMZN Return on Invested Capital data by YCharts

So, even if headwinds continue throughout this year, Amazon remains a fantastic long-term stock to own. And at today's price, it looks like a bargain.

2. Coca-Cola

Coca-Cola probably won't offer you explosive growth. But the world's biggest non-alcoholic beverage company hasn't exactly stopped growing either.

The company continues to diversify and expand its beverage portfolio in developed markets. And its brand strength keeps people coming back to their favorite beverages over time. This is showing in the company's earnings.

In the third quarter, Coca-Cola's net revenue climbed 10%. And comparable non-GAAP operating income on a currency neutral basis advanced 18%. Earnings per share also rose in the double digits.

Finally, Coca-Cola's biggest growth opportunity may lie in emerging markets. There, only 30% of drinks are commercial beverages. And today, Coca-Cola's share is about 6% -- that leaves plenty of room for growth.

But Warren Buffett doesn't just like Coca-Cola for its brand strength and earnings growth over the long haul. The company is a Dividend King, meaning it's lifted its dividend annually for at least 50 years. Today, Coca-Cola pays an annual dividend of $1.76, representing a dividend yield of 2.87%. That's higher than the industry average of 1.98%, according to NYU Stern Business School data.

Buffett loves this passive income from one of his top holdings. He's benefited from Coca-Cola's dividend growth over time -- and so can you if you buy and hold this beverage giant.