Jump to content

Invalid Amazon S3 endpoint


DZComposer

Recommended Posts

Posted

Something happened recently, and I'm not sure what or when.

I have an S3 bucket set up as a file store in my ACP for my IP.Downloads files.

Everything was working fine, but lately my downloads broke and I get an error from S3 saying "The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint" and suggests a different URL. If I paste said URL into my address bar, the download works.

I tried dropping that URL into my "Custom URL" in the ACP, but it did not fix it.

Any ideas?

  • 4 weeks later...
Posted

I've just had this issue - i'm hosted on "s3-ap-southeast" but it appears to use "us-east-1" as the default - and now Amazon requires you to prefix your bucket.

On the latest version of IPS I modified /File/Amazon.php and replaced 

$region = ( isset( $configuration['region'] ) ? $configuration['region'] : 'us-east-1' );

with

$region = ( isset( $configuration['region'] ) ? $configuration['region'] : 'ap-southeast-2' );

then

$canonicalHeaders = array(
			'Host'	=> 's3.amazonaws.com',
		);

with

$canonicalHeaders = array(
			'Host'	=> 's3-ap-southeast-2.amazonaws.com',
		);

then

$url = \IPS\Http\Url::external( 'https://s3.amazonaws.com' . $fileUrl )->setQueryString( $canonicalQueryString )->setQueryString( 'X-Amz-Signature', hash_hmac( 'sha256', $stringToSign, $signingKey ) );

with

$url = \IPS\Http\Url::external( 'https://s3-ap-southeast-2.amazonaws.com' . $fileUrl )->setQueryString( $canonicalQueryString )->setQueryString( 'X-Amz-Signature', hash_hmac( 'sha256', $stringToSign, $signingKey ) );

 

  • 1 month later...
Posted

Hello,

It seems i have the same problem with my cloud IPS forum.

I have one parent bucket on S3 and three sub-buckets

- MAIN
  --forum
  --gallery
  --downloads

Forum and Gallery works well, but when i try to download files from Download section the error occur:
The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint

Help please! 

Article is not accessible for me somehow ((

 

On 20 июля 2016 г. at 4:19 PM, Stuart Silvester said:

Please see the following KB article.

 



 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...