Knowing which stocks are the best to invest in isn't always easy. Some high-flying tech stocks that have received a lot of attention from investors may not be great long-term investments. Additionally, companies that aren't getting a lot of attention from Wall Street can be great additions to your portfolio.

If you're looking for two great companies that have the potential to be long-term winners far beyond this year, take a closer look at (NASDAQ:AMZN) and Roku (NASDAQ:ROKU). Here's why. 

A blue chart on a dark background

Image source: Getty Images.

Amazon's leading position in the cloud computing market

Amazon hardly needs an introduction, but if you've been on the fence about why you should open up a position in Amazon stock, here's one: Amazon Web Services (AWS). AWS is the company's cloud computing company that helps developers and companies of all sizes host their websites and apps, while also providing important tools like machine learning and analytics. 

AWS currently holds about 33% market share in the cloud infrastructure space right now, which easily outpaces Microsoft Azure's 18%. Not only is Amazon dominating this market, but the company continues to enjoy significant growth. In the third quarter (reported on Oct. 29), AWS's revenue reached $11.6 billion, a 29% year-over-year increase.  

Not only is AWS a leader in the cloud infrastructure market, but the segment is also very lucrative for the company. In the third quarter, AWS made $3.5 billion in operating income off its $11.6 billion sales, compared to the $2.3 billion Amazon earned from its $59.3 billion in sales from its North American e-commerce business.

With Amazon leading the pack in the cloud infrastructure market and AWS accounting for significant operating income for the company, tech investors will likely benefit as Amazon continues dominating this space.

A person pointing a remote at a TV.

Image source: Getty Images.

Roku's growing streaming opportunity 

Roku makes streaming devices that millions of TV watchers use to connect their TVs to the internet. It also makes an operating system that comes embedded into many smart TVs that's become a popular way for users to connect to their favorite streaming services. 

Roku's business surged this year as the pandemic forced people to spend more time in their living rooms. The company's total revenue grew 73% in the third quarter (reported on Nov. 5), and gross profit spiked 81% year over year. Those two figures were fueled by a 43% increase in active accounts, which now top 46 million, and a 20% spike in average revenue per user (ARPU).

Investors may be concerned that Roku won't be able to continue its phenomenal growth next year, but it's important to remember that TV viewing habits are shifting away from cable and satellite subscriptions and toward subscription services like Netflix, Apple TV+, Disney+, and many more.

The research firm eMarketer estimates that 6 million people cut the cord on cable this year, and that by the end of 2024, more than one-third of U.S. homes will have made the same decision. This shift could bring more customers to Roku's platform -- and advertisers along with it.

Roku said that in the third quarter, its first-time advertiser clients more than doubled from the year-ago quarter. Additionally, 97% of TV advertisers that spent $1 million with Roku in Q3 2019 came back to continue spending on Roku's platform in the most recent quarters. 

All of this means that, as Roku continues attracting more customers, it's going to continue bringing in more advertisers. And with more ad dollars shifting toward TV streaming platforms and away from traditional pay-TV sources like cable, Roku has plenty of opportunities to continue benefiting from this trend.

Don't forget Step 2 of this process

It's easy to get excited about a stock and quickly buy it. But it becomes much harder to stick with your investing thesis when the company experiences a bad quarter or two.

One of the best ways to build wealth is to hold onto great companies over the long term and let them grow. So once you purchase Amazon or Roku (or both), make sure to hold onto these companies for at least three years to let the current opportunities run their course.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.