-
I am playing with aws_sdk_s3 and trying to list the objects in a bucket. Apparently, there are 2 ways to build the URL to access bucket information (bucket or hostname) ref https://docs.ceph.com/en/pacific/radosgw/s3/commons/#bucket-and-host-name According to logs, aws-sdk-s3 build the bucket query using the hostname approach which is not working for me. logs:
My question is. Is there a way I can modify the bucket url from thank you very much |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Are you attempting to access an S3-hosted bucket? Those are the only ones we currently support by default. If not, you can manually set the URL with |
Beta Was this translation helpful? Give feedback.
-
I think you want to set let config = aws_config::load_from_env().await;
let s3_config = aws_sdk_s3::Config::from(&config)
.to_builder()
.force_path_style(true)
.build();
let s3_client = s3::Client::from_conf(s3_config); |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
I think you want to set
force_path_style
on the service config. Something like: