Pharmacy giants like CVS, Walgreens, or Rite Aid may seem to be everywhere. But don't be fooled: There are actually still quite a few independent community pharmacies in the U.S. — 22,041, to be precise — and they are putting up a good fight, controlling roughly $80 billion of the $200 billion pharmacy market.

But there's another business emerging on this battlefield: Amazon. The retail giant recently increased its exploratory pharmacy team to more than 30 people as it considers different ways to get a piece of the lucrative pharmaceutical market. The company also launched its own line of over-the-counter medications under the Basic Care label. It may not be long until the company is also fulfilling prescriptions. All of this plays perfectly into Amazon's monopoly game of being a one-stop shop for everything from laundry detergent to headache relief. Not surprisingly, both chain and independent pharmacies are getting very nervous.

Fortunately for small pharmacies, the tactics they're already using to fight mega-chains may also help them beat Amazon. The National Community Pharmacists Association (NCPA) points out that independent pharmacies "provide a variety of niche services, often unavailable elsewhere." For instance, they frequently offer customers a service called compounding, or personalized prescriptions. Since these types of medications aren't sold commercially, Amazon isn't likely to invest the time or effort into personalizing your meds. By offering niche services like this, small drugstores can continue to succeed.

Another service that independent pharmacies have mastered is medication therapy management. Usually, this type of service is detailed and thorough: Confused about when you should take your pills? Worried about vitamins interacting with your prescriptions? Don't bother turning to Amazon — medication therapy management isn't something their customer service line can handle. And your favorite mega-chain pharmacist is probably too busy and overwhelmed to do this type of review. However, your small local drugstore would probably be thrilled to offer you medication therapy management, including a drug review, personal medication record, and a medication-related action plan. An independent pharmacist may also follow up with you on the phone to make sure you understand the plan. It's that kind of service that will keep customers loyal. Good luck getting Amazon or a mega-chain to answer your call, let alone call you back.

Although some might argue that the convenience of quick home deliveries gives Amazon an advantage, many small pharmacies are copying this tactic, hoping to beat Amazon at its own game. A 2016 survey from the NCPA found that 65 percent of independent pharmacies offered home or work delivery, and many provide same-day delivery. Here's another blow for Amazon: Some pharmacies are waiving delivery charges, so it doesn't cost more to get your allergy medicine at home compared to standing in line at the store. It's hard to beat free home delivery.

If you prefer doing everything online, independent pharmacies are happy to oblige. In 2016, 60 percent of them offered online refills. And most are also happy to take your coupons online, too. Some have online chat options, so you don't have to talk on the phone, while others have active social media profiles that can respond to questions. You can even request an appointment online, so you never have to wait in line behind a wailing baby or bored toddler again.

And let's not forget the impact an aging population has on independent drugstores. Sure, many seniors are using mega-chains, but 44 percent of small pharmacies offer long-term care services to nursing homes and assisted living facilities. They're working directly with these care facilities to make sure senior citizens are receiving and taking the right medications. Often, independent pharmacies have exclusive partnerships with specific nursing homes or long-term residential facilities, so mega-chains don't even enter the picture.

Finally, there's something that Amazon and mega-chains haven't been able to replicate despite their marketing and advertising efforts: the personal customer service an independent pharmacy offers. Usually, local pharmacists running a small business will remember your name and ask about your allergies before even seeing a prescription. They'll worry if you don't pick up your pills on time. They'll remember that your child hates the bubblegum-flavored medicine and offer the grape-flavored stuff instead. It's this kind of customer service that pharmacy juggernauts — Amazon included — may never be able to completely replicate.