I had this exact same problem just now - my forum is using Backblaze B2, not Amazon S3, so I suspect that’s part of the problem. To fix it, I uncommented this line in /var/discourse/containers/app.yml:
#version: test-passed
and changed it to:
version: stable
then ran /var/discourse/launcher rebuild app again and it all rebuilt fine.