-
Tried to setup using E.g. when I try to create a bucket it calls
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Are you able to post a minimal example that reproduces your issue? Also, logging your app and then posting the logs is really helpful when debugging issues like this. Also, in case you haven't seen them already, we have localstack examples here. |
Beta Was this translation helpful? Give feedback.
-
UPD: It's not required, I could just use Solved the issue with this custom endpoint resolver: pub struct ForceBucketInPathResolver {
base_resolver: Endpoint,
}
impl ResolveEndpoint<aws_sdk_s3::config::endpoint::Params> for ForceBucketInPathResolver {
fn resolve_endpoint(&self, params: &aws_sdk_s3::config::endpoint::Params) -> aws_smithy_http::endpoint::Result {
match params.bucket() {
Some(bucket) => self.base_resolver.resolve_endpoint(params).map(|ep| {
let url = ep.url().to_owned();
ep.into_builder().url(format!("{url}{bucket}")).build()
}),
None => self.base_resolver.resolve_endpoint(params),
}
}
} |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
UPD: It's not required, I could just use
builder.force_path_style(true)
(thanks to rcoh).Solved the issue with this custom endpoint resolver: