The job cuts will affect lucrative areas for the company including its cloud computing division AWS as well as its growing advertising business.