A federal judge Thursday ordered a temporary block on the JEDI cloud contract, which was awarded to Microsoft, in response to a suit filed by Amazon. Shares of Microsoft fell on the news, while Amazon's stock was down slightly.

A court notice announcing the injunction was filed on Thursday but wasn't public. It's unclear why the documents were sealed.

The Joint Enterprise Defense Infrastructure, or JEDI, cloud computing contract is intended to modernize the Pentagon's IT operations. The contract could be worth up to $10 billion for services rendered over as many as 10 years. Microsoft was awarded the contract on Oct. 25.

Amazon's cloud-computing arm, Amazon Web Services, is instructed to earmark $42 million for any "costs and damages" that could be incurred in the event that the "injunction was issued wrongfully," the filing states. Amazon must file a notice with the courts indicating it has obtained the $42 million by Feb. 20. Microsoft and Amazon must respond to the filing by Feb. 27.

Microsoft and the Department of Defense criticized the ruling.

Frank Shaw, Microsoft's corporate vice president of communications, told CNBC in a statement: "While we are disappointed with the additional delay we believe that we will ultimately be able to move forward with the work to make sure those who serve our country can access the new technology they urgently require. We have confidence in the Department of Defense, and we believe the facts will show they ran a detailed, thorough and fair process in determining the needs of the warfighter were best met by Microsoft."

Department of Defense spokesperson Lt. Col. Robert Carver said, "We are disappointed in today's ruling and believe the actions taken in this litigation have unnecessarily delayed implementing DoD's modernization strategy and deprived our warfighters of a set of capabilities they urgently need. However, we are confident in our award of the JEDI cloud contract to Microsoft and remain focused on getting this critical capability into the hands of our warfighters as quickly and efficiently as possible.