2013 Mercedes glk 250

I have a 2013 glk 250 with bad upstream nox sensor. Can I change this myself or does it need to be programmed to communicate to the ecu