When Amazon announced last week that it was buying the online pharmacy PillPack, it sent stocks of drugstore companies like Walgreens and Rite Aid tumbling, as investors worried that the retail behemoth would soon upend the pharmacy market.

But even though Amazon has transformed the way Americans buy products as different as books and diapers, it may not have such an easy time with prescription drugs. That’s because to succeed, it will have to do business with powerful entrenched companies who are not necessarily wishing Amazon well.

As a relatively small pharmacy with about $100 million in annual revenues, PillPack most likely didn’t attract much attention from the pharmacy industry’s giants, said Eric Percher, an equity research analyst at Nephron Research.

“I think they have absolutely been able to fly under the radar,” he said. But now that a household name like Amazon is buying the company, “the entities that have enabled PillPack’s success — whether they knew it or not — have a decision to make,” he said.