I am using Salesforce supported sample code to integrate application with S3. I followed this Link to install package
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="
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:
- Change (or add a new one) the Remote Site URL to: https://s3-us-west-1.amazonaws.com
- Change lines 178 and 1407 of your S3.cls file from:
- 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.
I did what Sanjay suggested, and changed the S3.cls class. I replace line 178 and 1406 with:
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.