Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Installed amazons3 7.x-2.1-beta1
applied the neccessary patches
valid S3 access credentials
region: eu-central-1
I get the
The file could not be uploaded.
when trying to upload a file.
After I changed the default region value line 78 in src/StreamWrapperConfiguration.php
from
'region' => 'us-east-1',
to
'region' => 'eu-central-1',
the Upload works ( removing too) .
But to open a file the url is https://s3.amazons3.com/<bucket>/<file>
and I get the error
<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>
</Error>
The access works fine to https://s3.eu-central-1.amazons3.com/<bucket>/<file>
Thanks in advance.
Comments
Comment #2
deviantintegral CreditAttribution: deviantintegral at Lullabot commentedI can replicate this. I've been working on a way to handle this, but the SDK forces you to recreate the S3Client object to change a region which is complicating things. I have a WIP, but it's still pretty broken and I'm not happy with it's approach, so if anyone else wants to take this on feel free.
Comment #3
deviantintegral CreditAttribution: deviantintegral at Lullabot commentedI've filed a PR for this over at https://github.com/justafish/drupal_amazons3/pull/45
Comment #5
deviantintegral CreditAttribution: deviantintegral at Lullabot commentedI've committed this to 7.x-2.x.