Microsoft has signed a new seven-year deal with Walgreens Boots Alliance to supply cloud services to the retail pharmacy store chain. Walgreens, the second-biggest pharmacy chain in the US, is planning to “migrate the majority” of its IT infrastructure over to Microsoft’s Azure service, and it’s promising “new transformational platforms in retail, pharmacy and business services” as a result of the deal. Microsoft will also roll out Microsoft 365, a combination of Windows 10 and Office, to Walgreens’ 380,000 employees and stores globally.

Walgreens is the fourth major retailer to partner with Microsoft in recent months. Walmart, Kroger, and Gap have also partnered with Microsoft in moves that are clearly designed to fight off competition from Amazon and others. Amazon acquired Whole Foods in 2017, and it’s reportedly planning to open 3,000 Amazon Go stores across the US in a threat to traditional retailers.

Microsoft is helping major retailers fend off the Amazon competition

While Walmart and Kroger have reason to fear Amazon’s brick-and-mortar store push, the retail giant is also entering the health care market that Walgreens competes in. Amazon acquired pharmaceutical startup PillPack last year, and stock prices for Rite Aid, Walgreens, and CVS fell dramatically in the immediate aftermath. Amazon, Berkshire Hathaway, and JPMorgan Chase also announced last year that they would form a new health care company in the US to rethink health care for their employees. Amazon hasn’t announced any major push into health care just yet, but it’s clearly laying the groundwork that’s making rivals nervous.

Microsoft is capitalizing on this fear. While the software giant has formed an unlikely partnership with Amazon for Cortana and Alexa digital assistants, it has been quick to offer up cloud services and software for the retailers attempting to fend off Amazon competition. Microsoft is also rumored to be working on a cashier-free store system which it could make available to retailers like Walmart, Walgreens, Gap, and Kroger.