Explore Courses Blog Tutorials Interview Questions
0 votes
in Salesforce by (11.9k points)
edited by

I am developing code for salesforce. We are using ' for Amazon Web Services' App from Appexchange. The app is provided by Amazon.

I am downloading files from Amazon S3 on a machine.

Sometimes I am getting the below-mentioned error. Interesting thing is, only sometimes I get this error, rest of the times it works, even for the same file.




The request signature we calculated does not match the signature you provided. Check your key and signing method.


I tried using both URL patterns provided by Amazon. Expires is set for 1hr after link generation, hence may not be an issue.



The signature is generated by class provided by Amazon, I guess it must work well all of the times.

Can someone elaborate why would S3 give this error only sometimes?

1 Answer

0 votes
by (32.1k points)
edited by

Sample URL for a file on Amazon S3 is-

The Signature is formed by classes rendered by Amazon.

For untold reasons, ' for Amazon Web Services' app might be generating signature which basically contains SPACES.

Example: In the given URL, space is substituted by '+'.

You just need to URL encode the signature in order to get rid of this problem. Encoding will substitute spaces with special characters and problems will be resolved.

Learn about Salesforce by signing up for this professional Salesforce course online!

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories