I wouldn't go as far as calling it a complete rewrite. The renderer (called Atom) is completely new, but many other things stayed the same. Our Lumberyard Gem required some work to port over, but that was mostly replacing old CryEngine stuff with the equivalent in the Lumberyard/O3DE API.