The good thing about having those set in the app.yml is that all you need to restore your site to a new server is that file; you can then install a fresh discourse and
./launcher enter app
discourse enable_restore
discourse restore
then copy/paste the backup that you want to restore.
That’s not a Discourse issue, then. There are a variety of tools you can use to do that, so search something like “move data s3 bucket”. I use s3cmd, for reasons I don’t recall.