The on-chip piezoelectric actuation is experimentally shown to be a suitable method for driving the resonant vibrations of AlGaAs/GaAs-based nanomechanical resonators containing a two-dimensional electron gas. Both flexural and torsional vibrations of 166 nm-thick cantilevers and doubly clamped beams can be driven using this method at room temperature. At least two points should be addressed when reducing the size of the piezoelectrically-driven resonators. First, as shown in the paper, the parasitic attenuation of the driving electrical signal becomes the main factor limiting the actuation efficiency at the eigenfrequencies increased to the megahertz range due to the size reduction. Second, thin and relatively long bridge-like AlGaAs/GaAsbased resonators are prone to the Euler buckling instability caused by the longitudinal compressive stress. It is demonstrated that the buckling does not hinder the actuation at near-critical compression. However, a large super-critical compression can lead to a complete suppression of the piezoelectrically-driven vibrations. A method to avoid this suppression is proposed.