We consider the time-harmonic Maxwell equations with impedance boundary conditions on a bounded Lipschitz domain $\Omega$ with analytic boundary $\Gamma$. We suppose that $\Omega$ consists of multiple subdomains, and that the permeability and permittivity tensors are analytic on every subdomain, but may jump across subdomain interfaces. Under these conditions we show that for any wavenumber $k\in\mathbb{C}$ with $|k|\geq 1$ for which Maxwell's equations are polynomially well-posed, a Galerkin discretization based on N\'{e}d\'{e}lec elements of order $p$ on a mesh with mesh width $h$ is quasi-optimal, provided that there holds the wavenumber-explicit scale resolution condition a) that $|k|h/p$ is sufficiently small and b) that $p/\log |k|$ is bounded from below.