-
When I use the API like this, I get the error below: let store = object_store::aws::AmazonS3Builder::from_env()
.with_bucket_name(bucket)
.with_region(region)
.build()?;
store.put(&target_path, bytes).await?; Error:
It tries a bunch of times to connect to this particular IP address and then fails producing an error code about host unreachable. I googled and understand this IP is some range associated with aws meta data? It looks like a DNS error but no idea why my machine can't get DHCP to work only with using this crate? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It is trying to talk to an EC2 metadata endpoint to source credentials, this won't work on a local machine. If you provide it with credentials it should behave https://docs.rs/object_store/latest/object_store/aws/struct.AmazonS3Builder.html#example Alternatively you can disable signing if credentials are not required - https://docs.rs/object_store/latest/object_store/aws/struct.AmazonS3Builder.html#method.with_skip_signature |
Beta Was this translation helpful? Give feedback.
It is trying to talk to an EC2 metadata endpoint to source credentials, this won't work on a local machine. If you provide it with credentials it should behave
https://docs.rs/object_store/latest/object_store/aws/struct.AmazonS3Builder.html#example
Alternatively you can disable signing if credentials are not required - https://docs.rs/object_store/latest/object_store/aws/struct.AmazonS3Builder.html#method.with_skip_signature