James Martin/CNET

President Donald Trump ordered former Defense Secretary James Mattis to "screw Amazon" out of the chance to bid on a $10 billion Pentagon contract, a new biography of Mattis says, according to a report this week by military-focused website Task & Purpose.

The cloud computing services contract, for the Defense Department's Joint Enterprise Defense Infrastructure (JEDI), was awarded to Microsoft on Friday. Trump issued his directive to Mattis during a phone call last year, the biography said, according to Task & Purpose, which received an advance copy. CNET hasn't reviewed the biography, Holding the Line: Inside Trump's Pentagon With Secretary Mattis, by Guy Snodgrass, a former speechwriter for Mattis.

Amazon and its CEO, Jeff Bezos, are favorite targets of Trump, whose attacks are widely seen as stemming from unflattering coverage by the Bezos-owned Washington Post.

According to Task & Purpose, the biography says that during a meeting, Mattis told Snodgrass and others about Trump's order and said, "We're not going to do that. This will be done by the book, both legally and ethically."

The White House didn't respond to a request for comment. Snodgrass and the Defense Department's Office of Inspector General declined to comment. Mattis didn't immediately respond to a request for comment made through the Hoover Institution at Stanford University, where he's a fellow.

In a statement sent to CNET, Mattis' assistant said Mattis "hasn't read the book and doesn't intend to," adding that Snodgrass "was a junior staffer who took notes in some meetings but played no role in decision making." Task & Purpose reported that Snodgrass had earlier responded to Mattis' "junior staffer" assertion by pointing to the citation of an award he received from Mattis, which said Snodgrass "played a vital and influential role in the Department of Defense's strategic messaging" and was "integral in developing several foundational strategic guidance documents with far-reaching effects across the Department."

Originally published Oct. 26, 8:45 p.m. PT.

Update, Oct. 28: Adds details from Task & Purpose report.