NEW YORK — Now at Amazon.com: insulin and inhalers.

The online colossus opened an online pharmacy Tuesday that allows customers to order medication or prescription refills, and have them delivered to their front door in a few days.

The potential impact of Amazon’s arrival in the pharmaceutical space rippled through that sector immediately. Before the opening bell, shares of CVS Health Corp. fell almost 9%. Walgreens and Rite Aid both tumbled more than 10%.

The big chains rely on their pharmacies for a steady flow of shoppers who may also grab a snack, shampoo or groceries on the way out. All have upped online services, but Amazon.com has mastered it, and its online store is infinitely larger.

Amazon began offering commonly prescribed medications Tuesday in the U.S., including creams, pills, as well as medications that need to stay refrigerated, such as insulin. Shoppers have to set up a profile on Amazon’s website and have their doctors send prescriptions there. The company said it won’t ship medications that can be abused, including many opioids.

Most insurance is accepted, Amazon said. But Prime members who don’t have insurance can also buy generic or brand-name drugs from Amazon for a discount. They can also get discounts at 50,000 physical pharmacies around the country, inside Costco, CVS, Walgreens, Walmart and other stores.

Amazon has eyed the health care industry for some time. Two years ago, it spent $750 million to buy online pharmacy PillPack, which organizes medication in packets by what time and day they need to be taken. Amazon said PillPack will continue, focusing on shipping medication to people with chronic conditions.

In response, CVS and Walgreens, which built thousands of drugstores nationwide to get closer to customers, have been trying to adjust to the rise of online shopping by offering same-day delivery. Earlier this year, CVS started testing prescription deliveries with self-driving vehicles, and Walgreens experimented with drones that can deliver minutes after being ordered.