-
Notifications
You must be signed in to change notification settings - Fork 634
Description
Checkboxes for prior research
- I've gone through Developer Guide and API reference
- I've checked AWS Forums and StackOverflow.
- I've searched for previous similar issues and didn't find any solution.
Describe the bug
I am faceing a similar issue, In react I am using S3Client with endpoint: proxy_url.
const client = new S3Client {
endpoint: 'http://localhost:9000/s3-path',
forcePathStyle: true,
credentials: {
accessKeyId: accessKeyId,
secretAccessKey: secretAccessKey,
}
}
client.send(new ListBucketsCommand());
The server will receive this request at localhost:9000/s3-path and redirect it to s3-test.devcluster.openshift.com.
The same signature mismatch error is appearing for me. X-Amz-SignedHeaders=host is the issue. To generate the signature, the first call used localhost:9000 as the host. However, the host header that the S3 server receives is s3-test.devcluster.openshift.com. It results in a mismatch in signatures.
How do i resolve this issue?
Regression Issue
- Select this option if this issue appears to be a regression.
SDK version number
"@aws-sdk/client-s3": "3.667.0",
Which JavaScript Runtime is this issue in?
Browser
Details of the browser/Node.js/ReactNative version
md/browser#Chrome_129.0.0.0
Reproduction Steps
N/A
Observed Behavior
Error Loading : The request signature we calculated does not match the signature you provided. Check your AWS secret access key and signing method. For more information, see REST Authentication and SOAP Authentication for details.
Expected Behavior
It should return list of buckets
Possible Solution
No response
Additional Information/Context
No response