Oh, bosch warranties the motors for 2 years I believe but still check your dealer. Sometimes they may make an exception.
Bearing replacement is significantly cheaper than buying a new motor. If you are handy diy is an option. Here is a video
What kind of conditions did you ride btw?