Try running this and see if it generates an error:
cd /var/discourse
./launcher enter app
rails console
BackupRestore::S3BackupStore.create.vacate_legacy_prefix
If there’s really no backups in the bucket, the last line should output an empty list:
=> []