I'm upgrading a system that uses aws-php-sdk v2
to aws-php-sdk v3
.
In v2
i have something like:
$this->s3->upload($bucket, $key, $file, 'public-read');
//Where $this->s3 is a S3Client instance (from the SDK).
And it works well.
Now, after upgrading to aws-php-sdk v3
, it throws an error:
Error executing "PutObject" on "https://s3.region.amazonaws.com/folder/file.ext".
Client error:
PUT https://s3.region.amazonaws.com/folder/file.ext
resulted in a403 Forbidden
responseThe request signature we calculated does not match the signature you provided. Check your key and signing method.
Im using the same accessKey and secret that i used in v2
system.
As far as i know, is the PHP SDK that is responsible for signature calculation.. As i'm not doing any calculations manually.
What I'm doing wrong? Any ideas how to solve it?