As @ian-b's answer said, it can stem from typos or otherwise invalid TemplateURL
-s. In my case, it was the URL style issue:
https://REGION.s3.amazonaws.com/BUCKET/...
("path-style") – BAD
https://BUCKET.s3.region.amazonaws.com/...
("virtual-hosted-style") – GOOD