Replies: 8 comments 5 replies
-
Hi @dannyc1, I'd like to debug further, but could use a bit more information. First of all, what kind of OS are you running this from? Also, could you set your debug log to true and paste the output?
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply, @SamRemis! I'm running
|
Beta Was this translation helpful? Give feedback.
-
Just shooting out an update that I'm still trying to work through this issue. If anyone has any ideas let me know. |
Beta Was this translation helpful? Give feedback.
-
@dannyc1 I think I'll have to contact the S3 team and see what signature they're expecting and how ours differs. We've had issues before where they expect our headers in a different order, so I'm wondering if this is similar. In the meantime, you're using the same credentials in both PHP and JS, right? And they definitely have access to the objects you're trying to access? |
Beta Was this translation helpful? Give feedback.
-
I'm not using any JavaScript, but I do have PHP pulling the credentials from my AWS configuration in Thanks for the response. Hopefully, the S3 team will have some insight. |
Beta Was this translation helpful? Give feedback.
-
I got same problem. |
Beta Was this translation helpful? Give feedback.
-
Hi @dannyc1, could you please let me know if by using the latest version you are still experiencing this issue?. I just looked at your code here and it seems to be correct, I also just tried a presigned url to download an object from a s3 bucket and it worked fine for me. Please let me know. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I do experience the same issue currently in the latest SDK version (3.277.5) and latest MinIO version, public buckets work with no problem, but once I try presigning a request the URL always result in the signature does not match error when accessed. I'm using the MinIO Docker image and the PHP 8.0 Docker image, both official images. |
Beta Was this translation helpful? Give feedback.
-
Version of AWS SDK for PHP?
aws/aws-sdk-php: 3.192.1
aws/aws-crt-php: 1.0.2
Version of PHP
7.4.3
My Issue
I'm attempting to create a pre-signed URL that'll be used to download a file from S3. Here is my PHP code:
The above code generates a URL that looks like this:
However, it always results in a
SignatureDoesNotMatch
error. Here is the full error output:I've done a lot of searching and have found people with similar issues, but none of the suggested fixes worked for me. I did attempt various versions of the SDK to make sure that didn't resolve the issue. That didn't help though.
I did get curious to see if maybe my issue was either specific to PHP or perhaps I had an AWS configuration incorrectly set so I wrote this Go code (aws-sdk-go version: 1.40.33, go version: 1.13.8):
The above generates a URL that looks like this:
That URL does work and will download the file from the S3 bucket.
Does anyone see what I'm missing that would prevent PHP from generating the presigned download URL?
Beta Was this translation helpful? Give feedback.
All reactions