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

Error in custom region when create the bucket. #340

Open
jiajun-c opened this issue Apr 24, 2023 · 1 comment
Open

Error in custom region when create the bucket. #340

jiajun-c opened this issue Apr 24, 2023 · 1 comment
Assignees
Labels

Comments

@jiajun-c
Copy link

Describe the bug
When use the custom region, it will report the urlParse(InvalidIpv4Address)

To Reproduce

pub async fn create_bucket(bucket_name: &str) -> Result<CreateBucketResponse, S3Error> {
    let region =  Region::Custom {
        region: "eu-central-1".to_owned(),
        endpoint: "127.0.0.1:9000".to_owned(),
    };
    let assess_key = "admin";
    let secret_key = "admin123";
    let config = BucketConfiguration::default();
    let cred = Credentials::new(Some(assess_key), Some(secret_key), None, None, None)?;
    let create_bucket_respone = Bucket::create(bucket_name, region, cred, config);
    create_bucket_respone.await
}

Expected behavior
A bucket should be create in my local minio, but it doesn't.
Environment

  • Rust version: [e.g. 1.68.2]
  • lib version [e.g. 0.33.0]
@kyasu1
Copy link

kyasu1 commented Apr 29, 2023

Hi, I was also stuck on the same issue. It seems that minio uses the path style by default while AWS uses the subdomain style.

https://github.com/durch/rust-s3#path-or-subdomain-style-urls-and-headers

So we need to use create_with_path_style to create and access buckets on the default minio or configure your minio to run as subdomain (virtual-host) style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants