Amazon (AMZN -1.14%) has been a disruptor causing problems across the entire retail space. In just the past year, you can blame the online retailer at least partly for Sports Authority going out of business, Sears teetering on the edge of oblivion, and even Macy's struggling for survival.

Costco (COST -0.55%), however, has been oddly immune to the impact of the online giant. Even though both Costco and Amazon court customers looking for discounts, the warehouse club has been able to maintain its business. In Costco's fiscal 2016, which closed on Aug. 28, the company reported comparable sales growth of 3% in the United States, 8% in Canada, 4% in the rest of its international stores, and 4% companywide when you factor out lower gas prices.

At a time when other retailers are struggling to survive as Amazon takes their business, Costco managed to grow net sales by 2% to $116.07 billion. In addition, the company managed to keep its net income relatively flat at $2.35 billion, or $5.33 per diluted share, for 2016, compared to $2.38 billion, or $5.37 per diluted share, last year. On top of that, membership has been growing and the warehouse club has added over 1 million new cardholders to its revamped credit card loyalty program.

It seems like, with the online company constantly improving its delivery and becoming even easier to do business with, that eventually even Costco will fall victim, but new research from Morgan Stanley (MS 0.20%) suggests that may not be the case.

Costco has proved resilient in the face of competition from Amazon. Image source: author.

What does the research say?

In its research report, which was reported on by The Seattle Times, Morgan Stanley found that "Costco and Amazon can coexist." The company surveyed 2,700 people and found that nearly half (45%) of Costco members also had an Amazon Prime membership.

"Members of both Costco and Prime have not and generally do not intend to spend more with one retailer/e-tailer at the expense of the other," according to the report, which noted brand loyalty being a boon to both.

Part of Costco's resilience comes from the fact that it sells groceries -- specifically perishables -- which Amazon has only tackled in limited markets. In a broad sense, the research showed that Costco members tend to buy groceries and large appliances with the warehouse club while Amazon has an edge in clothing, pet items, and consumer electronics.

It's a tenuous co-existence

Currently, Costco and Amazon can co-exist because Costco can leverage its strength in groceries to get people into its stores. The warehouse club also has an edge over its online rival in that it sells gasoline, something that's not possible for an online retailer to sell, and that also brings store traffic.

Costco also has a mild advantage in the scavenger-hunt nature of its stores. Consumers may go in for a specific purchase, but they can easily be led into buying something else.

These are reasons why Amazon has not crushed Costco so far, but the warehouse club should view these as temporary advantages. The online leader has steadily expanded its product range and it's not unreasonable to think that eventually it will solve the grocery issue on a national basis.

Costco has nothing to fear today, according to this research. That does not mean it won't be vulnerable in the future.