As you can see, here the Nitrogen atom has one lone pair of electrons which it can donate and oxidize (loss of electrons) itself. The species which accepts this lone pair of electrons will be reduced. Hence, it is a reducing agent.
H2S acts only as a reducing agent while SO2 can act both as a reducing and oxidizing agent because
The species undergoing oxidation acts as a _____ agent.