Technology stocks were hurt by a "challenging earnings season" last month but that's created a window of opportunity in both Amazon and Facebook, J. P. Morgan internet analyst Doug Anmuth tells CNBC. The two tech giants are Anmuth's top picks for the coming year.

"Amazon obviously took its lumps in [the third quarter] after earnings," Anmuth said. "The key is, once Amazon gets past [the fourth quarter], we would expect growth to accelerate in early 2019."

Jeff Bezos' e-commerce empire "stands out" the most among the internet names Anmuth covers, he said in a note to clients on Thursday. J. P. Morgan believes Amazon's core retail business remains strong. The analyst also sees the company's profitability to be further driven by its Amazon Web Services and advertising businesses.

Facebook's "stock has been under a lot of pressure for a long time," Anmuth said, but the third quarter "saw numbers which showed stability in the user base." While some view Facebook "as a 1-trick pony" built around advertising, Anmuth said CEO Mark Zuckerberg's company is "clearly pushing harder"

Anmuth noted that Facebook doubled its safety and security staff to 20,000 from 10,000, saying the firm is "certainly spending a lot of money around that investment."

"I think they are taking much more serious steps than a year or two ago," Anmuth said on CNBC's "Squawk on the Street." He sees Facebook finding growth again in three ways: Reversing the negative tide of public opinion, further stabilizing its core user base and identifying new revenue sources.

"I think the bar has been kind of set in an appropriate place," Anmuth said.