AuthorizationHeaderMalformed: the region 'us-east-1' is wrong; expecting 'ap-northeast-1'
Opened this issue · 3 comments
CuteDeng commented
get PHP Warning when S3::PutObject(), " AuthorizationHeaderMalformed: the region 'us-east-1' is wrong; expecting 'ap-northeast-1'"
maharzan commented
me too getting the same error but if you create the right bucket it works.
phpandrew commented
Have you tried using setRegion->('ap-northeast-1') ?
indextwo commented
@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);