Once a seemingly unstoppable retail juggernaut, Walmart’s been scrambling to define its digitally in this Amazon-defined era. This morning, the company announced that it’s struck a five-year deal with Microsoft, Amazon’s chief cloud competitor.

These sorts of partnerships are a regular occurrence for AWS — in fact, it announced one with Fortnite maker Epic Games, just this morning. The companies involved tend to put on a big show, in return for a discount on services, but Walmart and Microsoft are happily playing into the concept of teaming up to take on Amazon.

Microsoft’s certainly not making any bones about the competition. In an interview, Satya Nadella told The Wall Street Journal that the fight against Amazon “is absolutely core to this,” adding, “How do we get more leverage as two organizations that have depth and breadth and investment to be able to outrun our respective competition?”

Of course, neither Walmart nor Microsoft can be framed as an underdog in any respect, but Amazon’s stranglehold on online retail also can’t be understated. Not even a massive outage at the height of Prime Day could do much to ruffle the company’s feathers.

Included in the deal are AI/ML technologies design to help optimize the in-store experience — one of the key factors Walmart brings to the table in a battle against Amazon, which has mostly just dabbled in brick and mortar. For its part, Walmart has been testing cashier-less stores along the lines of Amazon’s, but the company has just to officially unveil its plans in that space.