Your wallets have nothing to do with your cardano-node instances or binaries on a machine.
Having the wallet keys on a linux instance on AWS that is running cardano-node (and I assume has a public IP address) is from start a bad idea. Your keys should stay only on a computer where only you have access, in your home, and also as encrypted backups on USB sticks, for example.
Returning to your original question: the normal way of updating cardano-node and cardano-cli is to get the new binaries (you compile them from sources or you download the binaries provided by IOG - links on the releases page on Github), replace the existing binaries on your linux VM and restarting the cardano-node service. Sometimes there also changes to the config files, so it is always a good idea to check the release notes to see if you need to update the config files.