Field-line localized ballooning modes have been observed at the edge of high confinement mode plasmas in ASDEX Upgrade with rotating 3D perturbations induced by an externally applied n = 2 error field and during a moderate level of edge localized mode-mitigation. The observed ballooning modes are localized to the field-lines which experience one of the two zero-crossings of the radial flux surface displacement during one rotation period. The localization of the ballooning modes agrees very well with the localization of the largest growth rates from infinite-n ideal ballooning stability calculations using a realistic 3D ideal magnetohydrodynamic equilibrium. This analysis predicts a lower stability with respect to the axisymmetric case. The primary mechanism for the local lower stability is the 3D distortion of the local magnetic shear.