Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Hardcoded value for region when creating new bucket. #70

@kielstr

Description

@kielstr

I've been hitting this error when using V4 auth and creating buckets.

AuthorizationHeaderMalformed: The authorization header is malformed; the region is wrong; expecting 'us-east-1'. at .../net-amazon-s3/lib/Net/Amazon/S3/Client.pm line 97.
	Net::Amazon::S3::Client::_send_request(Net::Amazon::S3::Client=HASH(0x7fcc28006e38), HTTP::Request=HASH(0x7fcbf196f140)) called at .../net-amazon-s3/lib/Net/Amazon/S3/Client/Bucket.pm line 36
	Net::Amazon::S3::Client::Bucket::_create(Net::Amazon::S3::Client::Bucket=HASH(0x7fcc28006e08), "acl_short", "private", "location_constraint", "ap-southeast-2") called at .../net-amazon-s3/lib/Net/Amazon/S3/Client.pm line 63
	Net::Amazon::S3::Client::create_bucket(Net::Amazon::S3::Client=HASH(0x7fcc28006e38), "name", "testing", "acl_short", "private", "location_constraint", "ap-southeast-2") called at bin/create-bucket-location.pl line 37

Backend is MinIO which has been configured to use ap-southeast-2. I can see it setting the header X-Amz-Bucket-Region to ap-southeast-2 However calling $client->create_bucket fails with the above error.

Seems to be due to the hardcoded value in Net::Amazon::S3::Request::CreateBucket->http_request

Happy to create a PR to remove region =>'us-east-1' or discuss further the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions