Microsoft (MSFT  ) is coming close to dethroning Amazon (AMZN  ) as king cloud player after winning a key Pentagon cloud-computing contract called Joint Enterprise Defense Infrastructure, or "JEDI."

Both companies provide large-scale cloud services to other smaller firms that require more horsepower, a service that forms the bulk of each tech behemoth's profits.

Microsoft's cloud business is called Azure and Amazon's unit is called Amazon Web Services (AWS).

On Friday, the Pentagon endowed Microsoft with the JEDI contact, which is said to be worth up to $10 billion over the next ten years. Interestingly, Amazon already has a contract with the Central Intelligence Agency, yet was unable to land the Pentagon deal.

"This is a game changer deal for Microsoft to win as this will have a ripple effect for years to come and speaks to a new chapter of [Microsoft] wining in the cloud versus Amazon," Wedbush analyst Dan Ives said in a note to investors Saturday. He also said he believes Amazon may challenge the decision in court.

In fact, Amazon may have peaked at this point. AWS quarterly sales increased 34.7% YoY, much less compared to Azure's 59% quarterly growth. This caused a large drop in the tech company's stock on Friday.

However, the loss of the JEDI contract does not mean it is completely over for Amazon. Before the deal closed, the military was under flack for only selecting a single contractor for the JEDI contract. It countered these criticisms by claiming it would not stick to just one company, and there would be future opportunities to work with the Pentagon in the domain of cloud-computing for other companies. As a matter of fact, the Defense Department has said it has several hundred separate clouds and JEDI would merely serve as an umbrella system.

"The acquisition process was conducted in accordance with applicable laws and regulations," the Department of Defense said in its announcement of the contract Friday. "All offers were treated fairly and evaluated consistently with the solicitation's stated evaluation criteria."