We address the surface vs bulk origin of the second-order optical nonlinearity in AlGaAs nanocylinders through polarization-resolved measurements. By comparing numerical simulations accounting just for bulk second-order nonlinearity with experimental results, we show that the surface contribution to second-harmonic generation (SHG) cannot be neglected and depends on the resonant conditions of the nanocylinder. Additionally, our analysis suggests that bulk and surface SHG are competing effects, and that their interference might influence the overall efficiency.