Removing some of the confusion around what format S3 bucket names and regions should be entered as well as providing an example of an S3 policy that follows best security practices for this sort of thing.
Heroku uses the referrer URL to point at the repo that should be deployed; from this page that includes part of a path that breaks the deployment (specifically /blob/master/docs/Running-Mastodon/Heroku-guide.md).
I've replaced the vanilla address with one that includes a specific reference to the root of the repo