The years-long battle between Amazon and retail companies has spilled over into the shipping industry, with FedEx and UPS adjusting their strategies as the tech giant, once simply a customer, is now a major competitor.

FedEx has announced two changes to its relationship to Amazon in recent months, including ending the ground delivery contract with the e-commerce pioneer. Meanwhile, UPS is exploring new technologies, such as drones and self-driving trucks, to modernize its delivery services.

The moves come as Amazon is building up its delivery fleet, renting planes and offering $10,000 to its employees to leave the company and start their own local delivery business.

"I think they have stated that they are now a competitor to the transport industry," said Ken Hoexter, a research analyst at Bank of America Merrill Lynch. "And FedEx has clearly viewed them now in their recent moves as an increasing competitor."

Just as some retail companies are uneasy about working with Amazon, which can be both a partner and a competitor, transportation companies are facing a similar dilemma. And with their customers facing off against Amazon in other industries, shipping companies may need to take sides.

Dan Neiweem, co-founder and principal of digital services and solutions provider Avionos, said that by ditching Amazon, FedEx may make itself more attractive to Amazon's competitors in the retail space.

He compared it to reports that WalMart is pressuring some of its partners to use Microsoft's Azure for cloud computing instead of Amazon Web Services. WalMart said "there are a small number of cases involving our most sensitive sales data that we'd prefer not sit on a competitor's platform" but its vendors can choose the cloud service they prefer.

"I think that what you'll see is that a lot of the shipments that Amazon was going into the USPS and FedEx with are now going to be transitioned from other retailers who are saying 'hey I don't anybody in my space who works with Amazon,'" Neiweem said. "And you see that parallel very, very tightly with AWS and Azure."

FedEx never relied on Amazon for a huge portion of its business. In a June statement announcing that Amazon would no longer be served by FedEx Express, the shipping company said Amazon accounted for 1.3% of its total revenues in 2018, or roughly $900 million.

From that perspective, FedEx's decision to cut ties with Amazon makes sense, Hoexter said.

"When you go to their sort centers, you can see that Walmart and Jet are a major customer of FedEx's, so certainly that relationship is as important if not more important than Amazon," Hoexter said.

"So if you have to choose one, if UPS is larger with Amazon and you're larger with Walmart, you're going to kind of work closer with that candidate."