Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AuthorizationHeaderMalformed: the region 'us-east-1' is wrong; expecting 'ap-northeast-1' #165

Open
CuteDeng opened this issue Dec 12, 2019 · 3 comments

Comments

@CuteDeng
Copy link

get PHP Warning when S3::PutObject(), " AuthorizationHeaderMalformed: the region 'us-east-1' is wrong; expecting 'ap-northeast-1'"

@maharzan
Copy link

me too getting the same error but if you create the right bucket it works.

@phpandrew
Copy link

Have you tried using setRegion->('ap-northeast-1') ?

@indextwo
Copy link

@lylesback2's answer is almost exactly right (just a small typo) but it totally pointed me in the right direction and now my uploads are working as expected.

$awsRegion = 'us-east-2';
$s3 = new S3($awsID, $awsSK);
$s3->setRegion($awsRegion);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants