Driven by growth in advertising revenue and its cloud business, Amazon could double its value — to about $2 trillion — in three to five years, Baron Capital analyst Ashim Mehra told CNBC on Thursday.

"When we look at three to five years, we are long-term shareholders, we think this company has the potential to double again in that type of time frame," Mehra said Thursday on CNBC's "Closing Bell."

Amazon's stock just after market open Thursday, marking a major milestone in its climb toward a $1 trillion market valuation. Apple became the first publicly traded U.S. company to reach that valuation in early August.

Mehra, who is also a portfolio manager at Baron Capital, said cloud computing and advertising will be the major growth areas fueling Amazon's rise to $2 trillion.

"Advertising, for those of us who have been paying attention over the last few quarters, has really become a big driver," Mehra said. "If you think about what that could be in three or more, in five years, that could be a $30 [billion] to $50 billion revenue business with very high margins."

Kim Caughey Forrest, Fort Pitt Capital Group analyst and portfolio manager, says other major companies will attempt to slow Amazon's growth, particularly when it comes to advertising revenue. To combat that, Amazon needs to learn to merchandise, she said.

"Amazon really is a convenience store; it is not a place I like to dilly-dally and shop," she said. "To really become a compelling long-term retailer, you have to learn how to merchandise. That's a big question mark."

Another "question mark," Caughey Forrest stressed, is AWS. She said rivals, such as Microsoft, already have a large install base using their tools and services, so it just makes sense for those customers to migrate their business to Microsoft's cloud.

"I think that's a real competition for the company. They're going to have to step it up and spend a whole lot more on tools and ancillary products you need whenever you are moving your business to the cloud in a meaningful way," she said.

But Mehra remained bullish on the transformative power of Amazon's cloud and advertising businesses. To get an idea of where Amazon could be in five years, Mehra said, just look at the business five years ago.

"The overall profitability of Amazon, when you compare it versus five years ago, if you just looked at the retail business, it's completely different. So the profitability is really inflecting at Amazon over this year and next year," he said.

At the moment, Mehra and Baron Capital aren't advocating to buy more shares of Amazon, but he said Amazon has "a lot more upside."