An edge resonant transport layer has been found to explain many aspects of fast-ion confinement under symmetry breaking 3D edge perturbations, such as edge localized modes (ELMs) and externally applied magnetic perturbations (MPs). Experimental measurements in the ASDEX Upgrade (AUG) tokamak show that fast-ion losses in the presence of symmetry breaking 3D fields strongly depend on the poloidal spectra of the applied MPs. This fast-ion transport is explained in terms of a resonant interaction between the perturbative fields and the particle orbital frequencies, which leads to the build-up of an Edge Resonant Transport Layer (ERTL) in the vicinity of the separatrix. Full-orbit following simulations including the plasma response have been performed to characterize the ERTL by means of the variation in the particle toroidal canonical momentum. The combination of the poloidal spectra of the applied MPs and the relative phase of the particles with respect to the perturbation determines the radial direction of the fast-ion transport, therefore degrading or improving the fast-ion confinement. Consequently, an appropriate arrangement of the heating systems and externally applied 3D fields provides an excellent tool to tailor the fast-ion distribution, thus modifying the drive/damping of electromagnetic instabilities through local wave-particle interactions. In this regard, proof-of-principle experiments have been conducted in AUG, where NBI-driven toroidal Alfvén eigenmodes (TAEs) were excited and suppressed on command using this technique. The importance of the ERTL is extended to ELM-induced fast-ion losses, during which acceleration of beam ions has been recently observed in AUG. Multiple velocity-space structures are observed to vary with the beam source and q95 values. This suggests that the acceleration results again from a resonant interaction between the beam ions and parallel electric fields arising during ELM filament eruption. The experimental results presented here may shed light on the physics underlying fast-ion confinement in the presence of both self-generated and imposed edge 3D perturbations. In the case of externally applied MPs, experiments have demonstrated the possibility of actuating on limited phase-space volumes of the fast-ion distribution to actively control TAEs, which is of great interest for future burning plasma experiments like ITER.