I replaced in build.sh
files_url=‘h t t p s : / / files .resin .io’
with
files_url=‘h t t p s : / / r e s i n - p r o d u c t ion-img-cloudformation .s3 .amazonaws .com/’
since it is the address I get redirected to when following ’ h t t p s : / / f i l es .resin .io’.
(Sorry for writing links this way, but new users can put only 2 links in their post)