I have seen reports of it working just fine. It will mean some downtime while the OS upgrades, but it should work.
I prefer to launch a new EC2 with a clean OS and copy stuff over as described at Move your Discourse Instance to a Different Server.
(I started using Linux when kernel upgrades usually required replacing all binaries, so some of my practices may be outdated. )