+1-888-365-2779
Try Now
More in this section

Forums / Set-up & Installation / Amazon S3 - must be addressed using the specified endpoint

Amazon S3 - must be addressed using the specified endpoint

4 posts, 0 answered
  1. Tony Bolton
    Tony Bolton avatar
    33 posts
    Registered:
    06 Oct 2009
    09 Oct 2010
    Link to this post
    Hi,

    I'm moving storage over to S3 and I've followed the instructions in the manual to the letter - however I'm having major problems with the integration.

    Basically whenever I try and upload a file to the bucket, it's saying it had a problem uploading the file.  There's nothing in the error log - the only way I've diagnosed the issue is using Fiddler, which on closer inspection is throwing up :

     

    HTTP/1.1 301 Moved Permanently   
    x-amz-request-id: xxxxxxxxxxxxxxxx
    x-amz-id-2: xxxxxxxxxxxxxxxxxx
    Content-Type: application/xml   
    Transfer-Encoding: chunked
    Date: Sat, 09 Oct 2010 00:26:18 GMT   
    Server: AmazonS3
    1b9  
    <?xml version="1.0" encoding="UTF-8"?>
    <Error><Code>PermanentRedirect</Code><Message>The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.</Message><RequestId>xxxxxxxxxxxxxxxx</RequestId><Bucket>yourlocal</Bucket><HostId>xxxxxxxxxxxxxxxx</HostId><Endpoint>yourlocal.s3.amazonaws.com</Endpoint></Error 
    0

    Looking around online it seems that if I create the bucket via S3's explorer, it can cause problems (please see http://docs.amazonwebservices.com/AmazonS3/2006-03-01/index.html?BucketConfiguration.html)

    My question is - how do I get S3 working with Sitefinity?  I'm on SP3 3.7.  Is there a patch/update I need to be aware of?

    I hope you can help as I want to get cracking on this asap.

    Cheers!
    Tony

  2. Tony Bolton
    Tony Bolton avatar
    33 posts
    Registered:
    06 Oct 2009
    09 Oct 2010
    Link to this post
    Oops sorry - here's my config settings as well which should help :

    <storageSetting defaultProvider="Amazon">
          <providers>
            <add 
               name="Amazon" 
               type="Telerik.Libraries.AmazonStorage.AmazonStorageProvider, Telerik.Libraries" 
               downloadUrlPrefix="http://s3.amazonaws.com" 
               accessKey="xxxxxxxxxxxxxx" 
               secretAccessKey="xxxxxxxxxxxxxxxxxxx" 
               bucketName="yourlocal" />
          </providers>
        </storageSetting>

    ...and...

    <add name="Libraries" urlRewriteFormat="~/{LibraryName}/[Name].s3lb"  thumbnailExtension=".tmb" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Name" applicationName="/Libraries" allowVersioning="True" allowLocalization="False" localizationProviderName="" allowWorkflow="False" securityProviderName="" versioningProviderName="" connectionStringName="GenericContentConnection" type="Telerik.Libraries.Data.AmazonProvider, Telerik.Libraries.Data" tagEditorTemplate="~/Sitefinity/Admin/ControlTemplates/Libraries/BatchTagsEditor.ascx" />

    Thanks,
    Tony
  3. Tony Bolton
    Tony Bolton avatar
    33 posts
    Registered:
    06 Oct 2009
    09 Oct 2010
    Link to this post
    For the benefit of others, I figured out the problem.  For some reason there's a limitation in S3, whereby if you create a bucket that is not "US Standard", you cannot use path-style syntax in the bucket address.  They state that :

    "Amazon S3 supports virtual-hosted-style and path-style access in all Regions. The path-style syntax, however, requires that you use the region-specific endpoint when attempting to access a bucket. For example, if you have a bucket called mybucket that resides in the EU, you want to use path-style syntax, and the object is named puppy.jpg, the correct URI is http://s3-eu-west-1.amazonaws.com/mybucket/puppy.jpg. You will receive a “PermanentRedirect” error, an HTTP response code 301, and a message indicating what the correct URI is for your resource if you try to access a non US Standard bucket with path-style syntax using:
    • http://s3.amazonaws.com

    • A different Region endpoint than where the bucket resides, for example, http://s3-euwest-1.amazonaws.com and the bucket was created with the location constraint of Northern-California"

    So, after figuring this out, I created a new bucket against US Standard (my previous bucket was Ireland), and that did the trick. You probably can use the above if you use the direct URL mentioned in the post (s3-eu-west-1-amazonaws.com) but I haven't tried this.

  4. Tim Down
    Tim Down avatar
    1 posts
    Registered:
    28 Jan 2010
    21 Feb 2012
    Link to this post
    "So, after figuring this out, I created a new bucket against US Standard (my previous bucket was Ireland), and that did the trick. You probably can use the above if you use the direct URL mentioned in the post (s3-eu-west-1-amazonaws.com) but I haven't tried this."

    Confirmed. Path-like file names work when addressing an EU bucket with the host s3-eu-west-1-amazonaws.com.
Register for webinar
4 posts, 0 answered