Replies: 3 comments 1 reply
-
Can you share a sample code I can use to reproduce? |
Beta Was this translation helpful? Give feedback.
-
Hello @debora-ito , Please find the sample code as follows: package com.test.awsS3.Utils; import com.amazonaws.AmazonClientException; public class S3FileCopy {
} Scenario: I am configuring the default region as us-east-1. And I am trying to copy the files from us-east-1 of AWS Account A to us-west-1 of AWS Account B. Following is the error occurred: com.amazonaws.services.s3.model.AmazonS3Exception: The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-west-1' (Service: Amazon S3; Status Code: 400; Error Code: AuthorizationHeaderMalformed; Request ID: 2NM03YBET2YBZD6V; S3 Extended Request ID: EYk+g0Y8y+1eEMCvcmgUGXMlaNEt5VLw9z2CTX7a4kO1chUFxFEZ/YDGOO+mf5B8VbykJ2QLvlI=), S3 Extended Request ID: EYk+g0Y8y+1eEMCvcmgUGXMlaNEt5VLw9z2CTX7a4kO1chUFxFEZ/YDGOO+mf5B8VbykJ2QLvlI= Thanks, |
Beta Was this translation helpful? Give feedback.
-
Hi @debora-ito , I have identified that the issue was raised by the following line: clientConfig.setSignerOverride("AWSS3V4SignerType"); What's the usage of this signer? And Is it required case or not while configuring the client? Thanks, |
Beta Was this translation helpful? Give feedback.
-
I am trying to copy the files from one bucket to another with different AWS Accounts and regions. Please find the AWS and region details as follows:
Source
AWS Account ID: 9858675xxxxx
Bucket: <source_bucket>
Region: us-east-1
Destination:
AWS Account ID: 2791777xxxxx
Bucket: <dest_bucket>
Region: us-west-1
While performing the copy operation with AWS S3 Client, I have getting the following error as
The authorization header is malformed; the region 'us-east-1' is wrong; expecting 'us-west-1' Service: Amazon S3; Status Code: 400; Error Code: AuthorizationHeaderMalformed; Request ID: Q5YDECPR6BPSS3A6; S3 Extended Request ID: qpKP6yqa7L8RDpghM3O57HigraSpoBU8JrksSnF9k8D5liEkPzflkKQbwLXewqCvPystHsk0pGQ=
It is working fine while performing the copy operation through AWS Cli. It's only issue for the AWS SDK.
AWS Java SDK S3 Version: 1.11.525
Could you please suggest on this?
Beta Was this translation helpful? Give feedback.
All reactions