Supporting S3 signature version 4
-
Hey,
I had a problem with not being able to use S3 via Amazon S3 and Cloudfront and it turns out this was because you don’t support V4 authentication (required by the new eu-central-1 region).
Just in case anybody’s wondering, it can be fixed by updating the AWS PHP SDK to the latest version (to support the new region) under ‘vendor’ and by modifying amazon-web-services.php under ‘classes’:
line 192:
$args = array( 'key' => $this->get_access_key_id(), 'secret' => $this->get_secret_access_key(), 'signature' => 'v4' );
So I simply added the ‘signature’ argument. V4 also requires the region to be set, so just set it in your wp-config.php with:
define( 'AWS_REGION', 'eu-central-1' );
I realize this is not really a fix as it forces V4 but it is a temporary fix for anybody using the new region.
Cheers.
- The topic ‘Supporting S3 signature version 4’ is closed to new replies.