function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bob17bob17 

AWS Toolkit handling of temporary redirect response

I am using the AWS Toolkit and when I attempt to access a bucket newly created on the EU Amazon server I am getting the following error:

 

System.CalloutException: Web service callout failed: WebService returned a SOAP Fault: Please re-send this request to the specifiedtemporary endpoint. Continue to use the original request endpoint for future requests. faultcode=soapenv:Client.TemporaryRedirectfaultactor=

Research on the Amazon AWS site indicates that requests may be redirected when new buckets are created on servers other then the default US server but it has been a couple of hours and still no luck.  Do I simply have to wait longer (any clue how long) of does the code require changes to look for this error and resubmit with the temporary endpoint?  I would prefer not to touch the toolkit code but I don't know if it is actively being kept up to date (don't believe the EU server existed when it was released). 

 

I tested with the sample app in an environment with the toolkit newly downloaded and got the same issue.

 

Has anyone else encountered this?  Anyone have a solution?

 

Thanks in advance,

 

bob

dipsdips

Hi,

 

Did you get the solution? How did you handle this redirection issue?

Andrew NgoAndrew Ngo
Link to solution for anyone running into this:
http://salesforce.stackexchange.com/questions/31523/problem-to-run-amazon-web-service-s3-integration-code-supported-by-salesforce

TLDR: Change the endpoint in the file S3.cls to include your region if the bucket is not US Standard

Older Code: 
public String endpoint_x = 'https://s3.amazonaws.com/soap';

Newer Code: 
public String endpoint_x = 'https://s3-us-west-1.amazonaws.com/soap';

And change the Remote Site Settings to match.