Hydrolysis of terminal non-reducing beta-D-galactose residues in beta-D-galactosides. Heterodimer of a large and a small subunit. By lactose. Belongs to the bacterial beta-galactosidase small subunit family.