Closed sixides closed 6 days ago
Hey,
it seems that this not working when CloudFront is signing the request to S3 with the OAC feature. Until, we figure out the reason, what you can do is encode the url in the CloudFront Function, then decode it in the Lambda function when retrieving the object from S3
Hi thanks for replying. I actually did try manually replacing the space with %20 like this 2577575540143-Green%20Firm.png in the URL and it also causes the same error. If getting this exact filename directly S3 link its perfectly fine.
https://d1ypz6uabe5poc.cloudfront.net/uploads/2577575540143-Green%20Firm.png (fails) https://sixides.s3.ap-southeast-1.amazonaws.com/uploads/2577575540143-Green%20Firm.png (ok)
I have dived into it. It's related to a bug under investigation / fix in OAC with Lambda. Until we have a permanent fix you can:
Hi thanks for the feedback. Will try to do the workaround. It also doesn't work with other languages (non english letters). Hope the bug gets squashed soon. :)
The fix is being deployed, should be done in a week or so
seems to be fixed now, can you test again?
@achrafsouk Hi there, yes have tested with %20, Chinese characters and other Unicode characters in the filename and it all works. Thank you so much.
Hope you can help advice as we have images that has + and even spaces (which URL would encode it as %20), when this happens the error below is shown. Any other images works fine. Been researching all over and checking but couldn't find a solution other than having to rename all the files in the origin bucket.
{ "message": "The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details." }