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