Skip to content
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

Amazon S3 - The authorization header is malformed; the region 'vpce' is wrong; expecting 'eu-central-1' #3018

Closed
heisenbergye opened this issue Sep 23, 2022 · 4 comments
Assignees
Labels
bug Something isn't working s3 Issues with the AWS Android SDK for Simple Storage Service (S3).

Comments

@heisenbergye
Copy link

heisenbergye commented Sep 23, 2022

Describe the bug
The authorization header is malformed; the region 'vpce' is wrong; expecting 'eu-central-1'

To Reproduce
A code sample or steps:
image

when creating a new progress listener for transfer, it got an ERROR as the following:

Received error response: com.amazonaws.services.s3.model.AmazonS3Exception: The authorization header is malformed; the region 'vpce' is wrong; expecting 'eu-central-1' (Service: null; Status Code: 400; Error Code: AuthorizationHeaderMalformed; Request ID: DN55*******2CRZ4), S3 Extended Request ID: RN8eBGO2ZCJGGy*******KtqO/1DwofYb6Bim2giwzG*******EiHZBliYfeNcU9*******OPblJJFQ=

maybe it is a bug similar as :
https://hadoop.apache.org/docs/stable/hadoop-aws/tools/hadoop-aws/troubleshooting_s3a.html
image

Which AWS service(s) are affected?
when upload picture by S3 interface endpoint in VPC, the transfer cannot be created.

Expected behavior
Please help to fix it that parse region code and produce url correctly.

Environment Information (please complete the following information):

  • AWS Android SDK Version: 2.35.0, 2.53.0
@heisenbergye heisenbergye changed the title Amazon S3 - The authorization header is malformed; the region 'vpce' is wrong; expecting 'us-east-1' Amazon S3 - The authorization header is malformed; the region 'vpce' is wrong; expecting 'eu-central-1' Sep 24, 2022
@eeatonaws eeatonaws added bug Something isn't working s3 Issues with the AWS Android SDK for Simple Storage Service (S3). labels Sep 26, 2022
@eeatonaws eeatonaws self-assigned this Sep 28, 2022
@eeatonaws
Copy link
Contributor

Thank you for reporting this issue. The AmazonS3Client is indeed parsing endpoints in VPC such that the region is "vpce". I am working on a fix for this issue.

@eeatonaws
Copy link
Contributor

A fix for the issue has been released in AWS SDK for Android 2.54.0.

@EddyChina
Copy link

any update on AWS SDK for Java? I got same exception with flink checkpoint.

@eeatonaws
Copy link
Contributor

Please create an issue in the AWS SDK for Java GitHub repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working s3 Issues with the AWS Android SDK for Simple Storage Service (S3).
Projects
None yet
Development

No branches or pull requests

3 participants