A lawsuit against a former Amazon Web Services sales executive who joined rival Google Cloud earlier this year took an interesting turn, with a federal judge slapping some major limitations on his new role while also criticizing Amazon’s non-compete policies.

Philip Moyer will not be allowed to work on any financial services projects, his area of expertise at AWS, for Google Cloud. He is also barred from contacting any AWS customers and any potential financial services customers, according to the ruling. These conditions will stay in place until the lawsuit is fully resolved, or until his non-compete expires in November 2020.

Amazon sued Moyer in July after the cloud sales executive left the company to join Google. In the lawsuit, the tech giant argued Moyer’s move to Google would “threaten the disclosure of Amazon’s highly confidential information,” in an alleged breach of his non-compete agreement. Moyer’s new role as vice president of sales for healthcare and life sciences for Google Cloud didn’t violate the non-compete agreement with Amazon because he works with a completely different customer base, his legal team argued.

The ruling is a partial victory for Amazon, but it doesn’t grant all its wishes. Amazon wanted Moyer barred from “engaging in any activities that directly or indirectly support any aspect of Google Cloud for the duration of his Noncompetition Agreement,” according to the original lawsuit. That would have essentially kept Moyer from doing the job at Google Cloud, and severely limited his future prospects in cloud sales, U.S. District Court Ricardo Martinez wrote in the ruling.

Martinez noted that Moyer did agree to the restrictions in the non-compete agreement when he joined Amazon. However, Martinez wrote that the court’s ruling “struck the appropriate balance” between the potential hardships of Amazon’s confidential information being used to bolster a competitor and Moyer’s career taking a significant hit.

GeekWire reached out to Amazon and Google for comment on the decision, and we will update this story if we hear back.

Non-competes are a lightning rod in the tech industry, with critics claiming they stifle innovation and give an unfair advantage to big corporations. Earlier this year, Washington state enacted legislation that makes it more difficult to enforce non-compete agreements.

The law requires employees to earn more than $100,000 per year for a non-compete to apply and the agreement can’t extend longer than 18 months. Amazon lobbied to have the salary threshold lowered.

Washington state law allows the court to “reform” a non-compete agreement to a more limited scope. That’s what happened in this instance.

Martinez found that the “non-compete provision is necessary to protect Amazon from Moyer positioning Google Cloud to better compete with AWS even if he does not disclose confidential information in the process.” However, later in the ruling Martinez called the restraints in the agreement “unreasonable” and noted “Amazon made no attempt to tailor its non-compete restrictions to the job it hired Moyer to perform.” Martinez continued:

Amazon could have easily crafted a noncompete provision more targeted to the position it hired Moyer to perform. Amazon could have limited the noncompete to financial services sales. If the sale of cloud computing to healthcare customers is as similar to sales to financial services customers as Amazon represents, Amazon could have reasonably restricted Moyer from both future financial services and healthcare sales positions. If Amazon’s concern is with individual competitors, it could have identified those competitors. If Amazon’s concern is with the information it shared with Moyer beyond that related to financial services, Amazon could have negotiated expansions to the noncompete provision to assure continued protection. Amazon did not limit the provision in any way. Rather, Amazon leaves it to the Court to draft a restriction that reasonably protects its interests.

Amazon hired Moyer, who worked at Microsoft for 15 years and served as chief executive for software-as-a-service companies Edgar Online and Cassiopae, in 2017. Moyer grew dissatisfied with a lack of growth potential at Amazon, according to court documents, and two years later joined Google Cloud.

Google appeared to recognize the potential non-compete issues, Martinez noted, hiring Moyer to focus on cloud sales to healthcare customers rather than financial services.

Amazon’s pioneering cloud business gave the company an early lead in an emerging and lucrative industry but competition is heating up with newer entrants, including Microsoft and Google, particularly when it comes to talent. Google upped the ante when it opened a big new campus for its cloud division right next door to Amazon’s Seattle HQ.

It’s been a rough week for Amazon’s cloud business, which didn’t live up to analyst expectations in the most recent quarter. Cloud rival Microsoft surprisingly beat out Amazon to win the $10 billion contract this week to rebuild the U.S. Department of Defense’s tech infrastructure.

This isn’t the first time Amazon has gone after a former employee for allegedly violating a non-compete agreement. Amazon sued former AWS VP Gene Farrell in 2017 for taking a job with Smartsheet, the maker of work collaboration software. The case rankled the startup community. Critics claimed Amazon was bullying a smaller company that it did not directly compete with. Amazon and Farrell eventually settled the suit after a judge temporarily enjoined Farrell from taking the job with Smartsheet.

In 2014, the company sued a former AWS strategic partnerships manager, Zoltan Szabadi, after he took a job at Google Cloud Platform. In 2012, it also sued former Amazon Web Services vice president, Daniel Powers, who joined Google as the search giant’s director of cloud platform sales. That case was transferred to federal court in Seattle, where a judge declined to enforce the most sweeping provisions of Amazon’s non-compete agreement.

Here is the full opinion:

Amazon v Moyer by Nat Levy on Scribd