Writing the ON of all the atoms above their symbols, we have
The ON of I2 decreases from zero in I2 to -1 in HI, therefore, I2 is reduced and hence it acts as on oxidant.
The O.N. of S increases from -2 in H2S to zero in S, therefore, H2S is oxidized and hence it acts as the reductant.