CNN  — 

A new biography of former Defense Secretary James Mattis reports President Donald Trump personally got involved in who would win a major $10 billion contract to provide cloud computing services to the Pentagon, according to the website Task & Purpose, which writes about military issues.

That hotly contested contract was awarded to Microsoft on Friday evening over Amazon in a months-long battle.

Task & Purpose reports the new book, “Holding The Line: Inside Trump’s Pentagon with Secretary Mattis” by former Mattis speechwriter and communications director Guy Snodgrass recounts that Mattis always tried to translate Trump’s demands into ethical outcomes.

According to Snodgrass’ book, Trump called Mattis during summer 2018 and directed him to “screw Amazon” out of the opportunity to bid on the contract.

Task & Purpose obtained an advanced copy of the book. CNN has not yet seen the book.

For several years Trump has voiced his displeasure with Amazon and Jeff Bezos, who also owns The Washington Post. He has accused Amazon of taking advantage of the Postal Service although independent investigations have disagreed with that contention. He also has linked his unfavorable view of Washington Post reporting to Amazon although the Post makes clear it is run separately.

“Relaying the story to us during Small Group, Mattis said, ‘We’re not going to do that. This will be done by the book, both legally and ethically,’” Snodgrass wrote according to Task & Purpose.

The White House did not immediately respond to a CNN request for comment.

In response to the book and some of the other claims it contains, a spokeswoman for Mattis earlier this week released a statement saying Snodgrass was a “junior staffer” and “played no role in decision making.” Snodgrass has responded to those claims by showing a citation he received in which he said he played a vital and influential role in the Pentagon’s messaging.

Amazon and Microsoft react

In a statement, Amazon said it is surprised at the decision.

“(Amazon Web Services) is the clear leader in cloud computing, and a detailed assessment purely on the comparative offerings clearly lead to a different conclusion,” the statement read. “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.”

In a statement, Microsoft pointed reporters to the Defense Department’s announcement.

“We are working on this right now. In the meantime for more information see the DOD’s announcement,” the statement read.

In July, Trump vowed that his administration would take a “strong look” at the Pentagon’s contract plan, saying that “some of the greatest companies in the world” had complained including IBM, Oracle and Microsoft.

Oracle had pushed hard to scuttle Amazon’s effort, going so far as to develop a document alleging that officials inside and outside the Pentagon had conspired to help Amazon win. CNN reported in July that the document had made its way to Trump’s desk.

Multiple independent reviews of the process found little evidence of wrongdoing, however.

In a statement, the Defense Department’s Office of the Inspector General said investigators are close to completing their work reviewing the awarding of the contract.

“To date, we have not found evidence that we believe would prevent the DoD from making a decision about the award of the contract,” said Dwrena Allen, spokesperson for the inspector general’s office. “We hope to have a completed report of our findings by the end of November, which we intend to release publicly, to the maximum extent possible.”

CNN’s Jason Seher contributed to this story