The vast majority of Amazon Prime members who have health insurance told Deutsche Bank that they would be willing to purchase prescription drugs on the online retailer's website.

According to the brokerage's recent study, 85 percent of insured Prime members would be comfortable buying drugs straight from Amazon.com, posing a huge opportunity for the e-commerce behemoth, according to analyst Lloyd Walmsley.

This burgeoning interest, combined with Amazon's announced acquisition of online pharmacy PillPack and its dominant Prime service, puts the company on an inevitable path toward a larger role in pharmaceuticals, the analyst wrote.

"Amazon has a history of starting small, testing the market and fine-tuning the service, before launching a full-fledged commercial operation," Walmsley wrote Monday. "As such, we believe it is a question of when and where — and not if — Amazon enters the healthcare space more forcefully."

Amazon announced plans to acquire PillPack in June, sparking a wave of selling in drug distribution stocks like Cardinal Health and McKesson, as well as drug retailers like CVS Health and Rite Aid.

Terms of the deal were not disclosed at the time, but individuals familiar with the discussions told CNBC that Amazon paid about $1 billion. But while Walmsley conceded that it could be years until the $930 billion-company establishes a commanding presence in the highly-regulated sector, some early opportunities remain.

"For Amazon, which has a ... wide variety of healthy and organic grocery options at Whole Foods, and the ability to order items using voice commands (Alexa), we think the opportunity to upsell pharmacy customers to purchasing other items is substantial," the analyst continued.

Amazon also announced earlier this year that it is teaming up with J.P. Morgan Chase and Berkshire Hathaway to create an independent operation to help cut health care costs for the three companies' 1.1 million employees.

Amazon's stock, which remains Deutsche Bank's top pick, has risen 8.2 percent since the announcement. The stock rose 0.2 percent Tuesday, adding to a climb of 66 percent since January.

In the near-term, though, the Seattle-based behemoth should be able to address a mail order pharmacy market worth about $22 billion, Walmsley said. Once the Amazon-PillPack deal is closed later this year, Amazon CEO Jeff Bezos should be able to use the company's 450 Whole Foods stores as new drug pick-up locations, the analyst said.

In time, the payoff could be impressive.

According to Walmsely, if Amazon can get to a 30 percent share of the mail order pharmacy market, as well as roughly $55 billion of front office sales and achieve 4 percent of U.S. online healthcare advertising, it could add $3 billion in gross profit.

Walmsley's price target on Amazon is $2,300, implying more than 18 percent upside from Monday's closing price.