Amazon plans to lay off as many as 30,000 employees across several divisions. The company said it’s cutting roles to help make the company leaner and less bureaucratic, while it looks to invest in generative artificial intelligence.

In a blog post, the company wrote that the layoffs are being carried out to help make the company leaner and less bureaucratic, while it looks to invest in “our biggest bets” including generative artificial intelligence.

“This generation of AI is the most transformative technology we’ve seen since the Internet, and it’s enabling companies to innovate much faster than ever before (in existing market segments and altogether new ones),” Beth Galetti, senior vice president of people experience and technology at Amazon, wrote. “We’re convinced that we need to be organized more leanly, with fewer layers and more ownership, to move as quickly as possible for our customers and businesses.”

The layoffs are expected to ultimately be the largest corporate job cuts in Amazon’s history, CNBC previously reported. Reuters reported the cuts could affect as many as 30,000 employees, citing sources familiar with the matter.

Amazon has approximately 350,000 corporate and tech employees, meaning the 14,000 job cuts represent about 4% of that segment of its workforce.

The company indicated that it will continue to lay off employees in the coming year, even as it plans to keep hiring in “key strategic areas.”