Header_image
Jeremy Walker

Software Developer & Social Entrepreneur

Paperclip error: AWS::S3::Errors::TemporaryRedirect (Please re-send this request to the specified temporary endpoint)

I was just setting up Paperclip to work on S3 when I got this error message:

AWS::S3::Errors::TemporaryRedirect (Please re-send this request to the specified temporary endpoint. Continue to use the original request endpoint for future requests.):

As far as I can tell there are two possible reasons for this.

Amazon Being Slow

This error can be caused by the fact that it takes up to 30mins for Amazon to set up a DNS endpoint for your new bucket. Simply do something else for a few minutes and you may find the problem solves itself.

Changing the URL in Paperclip

The second reason is to do with your Paperclip config. For some reason, Amazon might not accept the default url format http://s3.amazonaws.com/ihid/foobar.png. Instead you need to use the format http://ihid.s3.amazonaws.com/foobar.png.

This is really simple to do in Paperclip. Just add the url parameter:

has_attached_file :file, 
    storage: :s3,
    url: ":s3_domain_url",
    #...

Hopefully one of these two will fix the problem for you.

Share This Post

Comments

No-one has posted a comment yet. Be the first!

Post a Comment

I'd love to hear your thoughts :)