The bucket you are attempting to access must be addressed using the specified endpoint
<p>I'm using paperclip 5.0.0.beta2 in my latest rails (4.2.6) project. The application is hosted on Heroku. I can upload an image and it seems to be stored in a bucket on Amazon S3. However in the browser the image appears to have a broken url, although it's point to the bucket on Amazon S3, the url is:</p>

<p><a href="http://s3.amazonaws.com/gigbnb/profiles/profile_pics/000/000/002/small/anthony_candaele-300x300.jpg?1464956858" rel="noreferrer">http://s3.amazonaws.com/gigbnb/profiles/profile_pics/000/000/002/small/anthony_candaele-300x300.jpg?1464956858</a></p>

<p>When I enter this url in the browser, I get an xml page with this error message:</p>

<pre><code>The bucket you are attempting to access must be addressed using the     specified endpoint. Please send all future requests to this endpoint.
</code></pre>

<p>It looks like there is an issue with the S3 endpoint.</p>

<p>However I set the region (eu-west-1) in configuration file:</p>

<pre><code>config/environments/production.rb


config.paperclip_defaults = {
   storage: :s3,
   s3_region: ENV.fetch('AWS_REGION'),
   s3_credentials: {
     bucket: ENV.fetch('S3_BUCKET_NAME'),
     access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
     secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'),
   }
}
</code></pre>

<p>My Github repository is at:</p>

<p><a href="https://github.com/acandael/gigbnb" rel="noreferrer">https://github.com/acandael/gigbnb</a></p>

<p>Does anyone have an idea what's going on?</p>

<p>Thanks for your help,</p>

<p>Anthony</p>