0


I am using Salesforce supported sample code to integrate application with S3. I followed this Link to install package
http://wiki.developerforce.com/page/Installing_Force_for_Amazon_Web_Services https://login.salesforce.com/?
startURL=%2Fpackaging%2FinstallPackage.apexp%3Fp0%3D04t30000000OjsZ

When I am trying to get content list from bucket and for some other flows, I am getting following error(But some other flows are working fine i.e. create/delete bucket...). Not sure that there is some issue in my development organization or in installed Amazon package. Please guide me.

"Web service callout failed: WebService returned a SOAP Fault: Please re-send this request to the specified temporary endpoint. Continue to use the original request endpoint for future requests. faultcode=soapenv:Client.TemporaryRedirect faultactor="

3 Answers 3

2

You have to modify the endpoints based on the region you set up on your bucket. For example, if your bucket is in Northern California, you will have to:

  1. Change (or add a new one) the Remote Site URL to: https://s3-us-west-1.amazonaws.com
  2. Change lines 178 and 1407 of your S3.cls file from:

'https://s3.amazonaws.com/soap';

to

'https://s3-us-west-1.amazonaws.com/soap';

  1. Be sure you have access to the bucket, your key and secret are up to date, you created an AWS Credentials record with them, and you changed the AWSCredentialName variable value to whatever your credential's record is named, as explained here.
2

I made the following changes for ‘endpoint’ in the file “S3.cls” and able to run application.

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

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

1
  • for more details, follow this link (I have no sufficient reputation to use more than 2 links in my answer)link Apr 14, 2014 at 13:51
2

I did what Sanjay suggested, and changed the S3.cls class. I replace line 178 and 1406 with:

'https://s3-us-west-2.amazonaws.com/soap' instead of 'https://s3.amazonaws.com/soap'

But also, I needed to update the Remote Site Settings. So for me, I had to change the URL of my S3 Remote Site to https://s3-us-west-2.amazonaws.com

Then it worked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .