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.

The Defense Department was supposed to select the winner in September 2018 but delayed the process. Now the winner will be announced as soon as July 2019, Smith wrote in the email.

"The scope and complexity of DOD's mission requires multiple clouds from multiple vendors. JEDI is one element of DOD's overall multi-cloud strategy and part of larger efforts to modernize information technology across the DOD enterprise," Smith wrote.

Both IBM and Oracle previously protested the request for proposal for the contract. Those protests were dismissed.

AWS had revenue exceeding $7.4 billion in the fourth quarter. Microsoft does not disclose revenue for its Azure cloud, but in a note distributed to clients earlier this month, Morgan Stanley analysts led by Keith Weiss estimated that Azure gave Microsoft more than $3 billion in revenue in the fourth quarter.

The Pentagon has allocated $61.9 million for JEDI in the budget for the 2020 fiscal year.