Walmart Inc. agreed to use Microsoft Corp.’s cloud technology to power functions that could include algorithms for purchasing and sales-data sharing with vendors, the two companies said, deepening a partnership between two of Amazon.com Inc.’s most powerful rivals.

The five-year deal, announced Tuesday, pairs Amazon’s largest retail competitor with its closest challenger in cloud computing. Walmart has warmed recently to working with technology companies, as it fends off Amazon’s retail ambitions and expertise in data.

...

RELATED VIDEO

Is Amazon Going to Rule the World?

Amazon wants to deliver everything you want to your doorstep, anywhere in the world. But the e-commerce giant faces several challenges in its pursuit of a global empire. WSJ's Karan Deep Singh breaks down the basics with the help of an Amazon delivery box.