Oh deer!?! You don't want to upgrade your database infrastructure this way.
GOODNESS!
So many people have had an issue doing this. It almost always turns out icky. I cannot possibly urge you enough. Take a step back and do this, properly. You'll be a hero for doing it so smoothly! Bask in the glow of the blinky lights...
take a dump
dump your mysql database to a file. You might want to do this off-peak, as locking tables while the dump takes place may cause an issue with users?
put your fresh DB dump someplace safe, in AWS (preferably in-region)
spin up your fresh VM an install MySQL v8 as you normally would.
make sure you gather configuration changes from your older instance.
move your DB dump from earlier onto your new machine and import
While it is possible to do this live, it is NOT good practice to do so. Take a dump!!!
have everyone point applications at the new database server that you just expertly created and migrated.
Once everything is using your new v8 MySQL DB, stop the old DB VM. Just stop it. I would advise you to create an AMI of it, just in case something was forgotten. You could take a full backup of the VM, or attach the disk to another instance. Don't just willy-nilly delete it. Not yet. You might need to get something off there ... Be the Hero!
If your organization doesn't really care about cost control, then leave the stopped instance there until some planned and agreed time to terminate and delete the attached disks.
Of course, you could be super MySQL smart, and setup replication between your older DB server and a fresh, new, v8 DB server. Then once the nodes are in sync, break the replication & promote your new DB server to master. Might be a bit more work, however.
It's pretty risky doing an in-place upgrade with apt like that. If it doesn't work the first time, will there be customer impact? Will the business continue to do business without it? Would your boss hit the ceiling if you F-up the database and can't get it back online again?
If you answer 'yes' to any of those questions, you REALLY should be looking at doing this better. Smarter!
This could go so very badly and it really doesn't have to.
libgsasl
andsystemd
are your first problems. You need to install/resolve those issues first. BUT... Why might you not have systemd? that I can't say - sorry