Remove the button cover and with a small drill make a hole the size of the straw that comes with electrical contact cleaner on the upper black portion of the switch. spray contact cleaner, work switch several times, give it another spray and work the switch again. Its the contacts that get dirty...
common issue with the hazard switch, it is obsolete from GM.
Aftermarket are available but you can drill a small hole in it and spray contact cleaner in it and work the switch several times.
Worked perfectly for me, and you don't need to remove the switch.