Catalysis of the reaction: UDP-glucose + (S)-4-hydroxymandelonitrile = UDP + (S)-4-hydroxy-mandelonitrile beta-D-glucoside.
UDP-D-glucose:(S)-4-hydroxymandelonitrile beta-D-glucosyltransferase activity