aws-sdk-rust
aws-sdk-rust copied to clipboard
Custom Endpoint does not take IP
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 ;)
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.
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.