In the summer of 2018, President Trump ordered then-Defense Secretary James Mattis to "screw Amazon" out of the $10 billion Joint Enterprise Defense Infrastructure (JEDI) contract, according to an upcoming book.

In the Task & Purpose review of "Holding The Line: Inside Trump's Pentagon with Secretary Mattis," a book about Mattis' time in the Trump administration, former Defense communications director Guy Snodgrass lays out the general's conflicts with Trump, including legal and ethical concerns over the Pentagon's lucrative contract.

According to Snodgrass, Mattis pushed back on the request because he wanted to pursue the contract "by the book, both legally and ethically."

On Friday, the Pentagon announced Microsoft had won the contract, a surprise victory over front-runner Amazon Web Services. Previous reports stated that Trump wanted to "scuttle" the bidding process for the deal over concerns that Jeff Bezos, a rival with which Trump has publicly feuded, could benefit from the 10-year cloud computing contract.

The 10-year contract was to help the Department of Defense move sensitive data to the cloud. The bidding process began in July, and Microsoft eventually beat out companies like IBM and Oracle in addition to Amazon for the final deal. Google also participated but dropped out in late 2018 over concerns that it would be unable to fulfill the terms of the contract.

"The National Defense Strategy dictates that we must improve the speed and effectiveness with which we develop and deploy modernized technical capabilities to our women and men in uniform," DOD Chief Information Officer Dana Deasy said in a statement Friday. "The DOD Digital Modernization Strategy was created to support this imperative. This award is an important step in the execution of the Digital Modernization Strategy."

Amazon Web Services is "still evaluating options" after the Department of Defense selected Microsoft for a $10 billion contract to move the agency's database to the cloud, a source close to the situation told Business Insider on Friday.

"We're surprised about this conclusion," an AWS spokesperson said in a statement. "AWS is the clear leader in cloud computing, and a detailed assessment purely on the comparative offerings clearly lead to a different conclusion. We remain deeply committed to continuing to innovate for the new digital battlefield where security, efficiency, resiliency, and scalability of resources can be the difference between success and failure."