Amazon.com Inc.’s layoffs will affect more than 17,000 employees, a higher number than the company initially planned and one that would represent the most reductions revealed so far at a major technology company, according to people familiar with the matter.