Andrew Jassy, chief executive officer of web services for Amazon.com Inc., speaks during the 2019 CERAWeek by IHS Markit conference in Houston on March 11, 2019.

IBM and Oracle have been ruled out for a U.S. Defense Department contract for cloud computing services that could be worth as much as $10 billion over the course of a decade.

The deal, known as JEDI, would have been a boon to either of those technology companies, which trail Amazon and Microsoft in the public cloud market. Business from the CIA in the United States has helped Amazon Web Services in its effort to get more companies using its services, and the new Defense deal could be more valuable.

AWS and Microsoft are the only companies that meet the minimum requirements for the contract, Defense Department spokesperson Elissa Smith told CNBC in an email on Thursday. The New York Times first reported the decision on Wednesday.