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

sujomuc created an issue. See original summary.

deviantintegral’s picture

I 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.

deviantintegral’s picture

Status: Active » Needs review

deviantintegral’s picture

Status: Needs review » Fixed

I've committed this to 7.x-2.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.