aws-sdk-rust icon indicating copy to clipboard operation
aws-sdk-rust copied to clipboard

Custom Endpoint does not take IP

Open shikazu opened this issue 7 years ago • 2 comments

Hey guys,

as the title states, it's impossible to use an ip address in the url, because it can't get resolved. There should be an option for this (implicit).

Also the resolving of the domain ignores my hosts file on mac (ping works / nslookup & dig doesnt).

Not sure if this is my fault but if anyone got this problem, here's why ;)

shikazu avatar Jul 10 '17 08:07 shikazu

I believe this should actually work. You'll have to make sure you have virtual buckets disabled though.

Like this:

let endpoint = Endpoint {
        is_bucket_virtual: false,
        …
};

If you use virtual buckets, the bucket name is becomes part of the hostname. For instance, if you bucket name is my-bucket and your endpoint example.com, the actual endpoint address becomes my-bucket.example.com. This doesn't really work with IP addresses. Alternatively, you can also create an hosts entry for the actual endpoint hostname.

pgerber avatar Jul 11 '17 18:07 pgerber

I believe this should actually work

I can confirm it does work:

let endpoint = Endpoint::new(
            Region::EuWest1,
            Signature::V4,
            Some("http://172.17.0.3:9000".parse().unwrap()),
            None,
            None,
            Some(false),
        );

Tested with Minio.

ChristophWurst avatar Dec 09 '17 14:12 ChristophWurst