• Resolved kartano

    (@kartano)


    Hi,

    Two days ago I did a fresh wp installation for a single site and I succeed to setup the WP Offload S3 Lite plugin.
    according instructions here: https://www.codeinwp.com/blog/wordpress-s3-guide/

    Then yesterday I setup a fresh installation of WP with multisite and I can’t setup the S3 plugin. Using same credentials as before.

    #1 Initially using this bucket policy

    {
    	"Version": "2008-10-17",
    	"Statement": [
    	{
    		"Sid": "AllowPublicRead",
    		"Effect": "Allow",
    		"Principal": {
    			"AWS": "*"
    		},
    		"Action": "s3:GetObject",
    		"Resource": "arn:aws:s3:::x-x-x-x-x-x/*"
    	}
    	]
    }
    

    It’s not possible to connect, also not listen the existing buckets.

    #2 Then I give full access to the IAM user

    It’s possible to get the buckets name, but then on save this error came out:

    
    Error saving bucket — Error Getting Bucket Region —There was an error attempting to
     get the region of the bucket x-x-x-x-x-x-x-x: Error executing "GetBucketLocation"
     on "https://x-x-x-x-x-x-x.s3.amazonaws.com/?location"; AWS HTTP error: Client
     error: <code>GET https://x-x-x-x-x-x-x.s3.amazonaws.com/?location</code> resulted
     in a <code>400 Bad Request</code> response: AuthorizationHeaderMalformedThe
     authorization header (truncated...) AuthorizationHeaderMalformed (client): The
     authorization header is malformed; the region 'us-east-1' is wrong; expecting 'eu-
    west-1' - AuthorizationHeaderMalformedThe authorization header is malformed; the
     region 'us-east-1' is wrong; expecting 'eu-west-1'eu-
    west-1422D5F07E89CEC6CO0sOHfe2KboMN1l3lO7zs+T4ZXuDqXKg+qRjg+ZFXxR38Qa
    
    

    Also, I attached full access to the IC2 instance and same error

    Any idea what could be wrong?

    Thank you

    • This topic was modified 7 years, 11 months ago by kartano.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter kartano

    (@kartano)

    I searched more in details this message:

    AuthorizationHeaderMalformed (client): The
    authorization header is malformed; the region ‘us-east-1’ is wrong; expecting ‘eu-
    west-1’ – AuthorizationHeaderMalformedThe authorization header is malformed; the
    region ‘us-east-1’ is wrong; expecting ‘eu-west-1’eu-

    And there are many comments saying that it could be a duplicated name in other region, that seems quite weird.

    Most of the solutions are to rename or create another bucket.

    I created a new bucket and problem is solved.

    Plugin Contributor ianmjones

    (@ianmjones)

    Thanks for the update @kartano.

    It might be that with the large changes to WP Offload S3 Lite v1.4 to use AWS PHP SDK v3 that the changes in the way the newer SDK reports errors isn’t always handled appropriately, we’re keeping our eyes on this.

    Plugin Contributor ianmjones

    (@ianmjones)

    WP Offload S3 Lite 1.4.2 was just released with a bug fix for this issue.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error saving bucket — Error Getting Bucket Region’ is closed to new replies.