New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The request signature we calculated does not match the signature you provided. #2229
Comments
Hi @kirankumar-mahi! Thanks for filing an issue! I'm trying to understand the context for your issue. What is your end goal for using |
I missed the last line in your script. IIUC, you're uploading a file to Google Cloud Storage using the aws-java-sdk-s3 client library and you're seeing the |
@kirankumar-mahi, I was able to get passed this issue by using a different version of the signature (reference). I added the solution below, please let me know if you have any trouble. I tested this with version ClientConfiguration clientConfiguration = new ClientConfiguration();
// Solution is update the Signer Version.
clientConfiguration.setSignerOverride("S3SignerType");
AWSCredentials awsCredentials = new BasicAWSCredentials("XXX","XXX");
AmazonS3 amazonS3Client = AmazonS3ClientBuilder.standard()
.withCredentials(new AWSStaticCredentialsProvider(awsCredentials))
.withClientConfiguration(clientConfiguration)
.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration("https://storage.googleapis.com","Multi-Regional")).build();
String bucketName = "bucket_name";
String keyName = UUID.randomUUID().toString();
String filePath = "path/to/file.ext";
// I uploaded the file differently as `TransferManager` would hang after it completed
amazonS3Client.putObject(new PutObjectRequest(bucketName, keyName, new File(filePath))); |
It got resolved. Thanks. Closing this |
@frankyn @kirankumar-mahi I have some issues with listObjects. Created new issue here |
@frankyn I found this same error in the version 1.11.602 of SDK. |
Could you provide more context on the issue you're experiencing @allpereira? |
Hi,
I am using latest aws-java-sdk-s3', version: '1.11.158'. I am getting SignatureDoesNotMatch error. I am using below code.
The request signature we calculated does not match the signature you provided. Check your Google secret key and signing method. com.amazonaws.services.s3.model.AmazonS3Exception: The request signature we calculated does not match the signature you provided. Check your Google secret key and signing method. (Service: Amazon S3; Status Code: 403; Error Code: SignatureDoesNotMatch; Request ID: null
The text was updated successfully, but these errors were encountered: