Walmart, Microsoft are teaming up to take on Amazon

Walmart and Microsoft announced Tuesday they have forged a strategic partnership that will help both of them battle Amazon.

Although Walmart and Microsoft aren't exactly shrinking violets when it comes to market size, the five-year deal, which includes cloud, artificial intelligence and machine learning elements, will help both companies combat Amazon on several fronts.

Walmart has officially picked Microsoft Azure as its preferred cloud service provider. It stands to reason Walmart chose Azure over Amazon Web Services, which has long been the top cloud provider, because Walmart has been battling Amazon's online marketplace.

As part of the partnership, Walmart and Microsoft engineers will collectively work on the assessment, development and support phases of moving hundreds of existing applications to cloud-native architectures. Walmart will move large chunks of both walmart.com and samsclub.com over to Azure.

RELATED: Amazon Web Services still rules the cloud roost for market share

Walmart has been making a conscious effort to digitally transform itself from a brick-and-mortar company to a more nimble online entity to compete with Amazon Prime. Last month, Walmart announced a new personal shopping service that lets customers place orders via text message for faster deliveries. It also unveiled new apps for back-to-school shoppers. Microsoft and Walmart announced their deal during the Amazon Prime Day sale, which features discounted prices on electronic devices and other products.

Microsoft is providing Walmart with cloud computing, another area in which Microsoft competes against Amazon, as well as providing a more elastic cloud environment to manage workloads. Walmart is also hoping to cut its costs by moving toward a more cloud-native environment with Microsoft.

Walmart plans on tapping into Microsoft's artificial intelligence (AI) technology to reduce energy consumption in its stores and machine learning to help improve its delivery systems.

In addition to Microsoft Azure and the AI and machine learning technologies, Walmart will also use Microsoft 365. Walmart was already using Microsoft services for critical applications and workloads. Financial terms of the partnership weren't provided.

“Walmart is a pioneering retailer, committed to empowering its employees and delivering the best experience for its customers wherever they are,” said Microsoft CEO Satya Nadella in a prepared statement. “The world’s leading companies run on our cloud, and I’m thrilled to partner with Walmart to accelerate their digital transformation with Microsoft Azure and Microsoft 365.”

Microsoft also has a deal in place with Macy's that includes the use of an AI-based virtual agent for customer service.